botshield-sdk 1.9.0 → 2.0.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 (1154) hide show
  1. package/FUNCTIONS.md +87 -0
  2. package/README.md +485 -295
  3. package/RUNTIMES.md +48 -0
  4. package/bin/mcp-server.js +52962 -0
  5. package/bin/mcp-server.js.map +379 -0
  6. package/dist/commonjs/core.d.ts +10 -0
  7. package/dist/commonjs/core.d.ts.map +1 -0
  8. package/dist/commonjs/core.js +17 -0
  9. package/dist/commonjs/core.js.map +1 -0
  10. package/dist/commonjs/funcs/actions-cancel-action.d.ts +18 -0
  11. package/dist/commonjs/funcs/actions-cancel-action.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/actions-cancel-action.js +118 -0
  13. package/dist/commonjs/funcs/actions-cancel-action.js.map +1 -0
  14. package/dist/commonjs/funcs/actions-check-action-status.d.ts +18 -0
  15. package/dist/commonjs/funcs/actions-check-action-status.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/actions-check-action-status.js +122 -0
  17. package/dist/commonjs/funcs/actions-check-action-status.js.map +1 -0
  18. package/dist/commonjs/funcs/actions-propose-action.d.ts +18 -0
  19. package/dist/commonjs/funcs/actions-propose-action.d.ts.map +1 -0
  20. package/dist/commonjs/funcs/actions-propose-action.js +118 -0
  21. package/dist/commonjs/funcs/actions-propose-action.js.map +1 -0
  22. package/dist/commonjs/funcs/census-create-session.d.ts +18 -0
  23. package/dist/commonjs/funcs/census-create-session.d.ts.map +1 -0
  24. package/dist/commonjs/funcs/census-create-session.js +123 -0
  25. package/dist/commonjs/funcs/census-create-session.js.map +1 -0
  26. package/dist/commonjs/funcs/census-create-verification-link.d.ts +18 -0
  27. package/dist/commonjs/funcs/census-create-verification-link.d.ts.map +1 -0
  28. package/dist/commonjs/funcs/census-create-verification-link.js +123 -0
  29. package/dist/commonjs/funcs/census-create-verification-link.js.map +1 -0
  30. package/dist/commonjs/funcs/census-get-partner-config.d.ts +18 -0
  31. package/dist/commonjs/funcs/census-get-partner-config.d.ts.map +1 -0
  32. package/dist/commonjs/funcs/census-get-partner-config.js +138 -0
  33. package/dist/commonjs/funcs/census-get-partner-config.js.map +1 -0
  34. package/dist/commonjs/funcs/census-logout.d.ts +15 -0
  35. package/dist/commonjs/funcs/census-logout.d.ts.map +1 -0
  36. package/dist/commonjs/funcs/census-logout.js +120 -0
  37. package/dist/commonjs/funcs/census-logout.js.map +1 -0
  38. package/dist/commonjs/funcs/census-revoke-verification.d.ts +18 -0
  39. package/dist/commonjs/funcs/census-revoke-verification.d.ts.map +1 -0
  40. package/dist/commonjs/funcs/census-revoke-verification.js +123 -0
  41. package/dist/commonjs/funcs/census-revoke-verification.js.map +1 -0
  42. package/dist/commonjs/funcs/census-store-signal.d.ts +18 -0
  43. package/dist/commonjs/funcs/census-store-signal.d.ts.map +1 -0
  44. package/dist/commonjs/funcs/census-store-signal.js +114 -0
  45. package/dist/commonjs/funcs/census-store-signal.js.map +1 -0
  46. package/dist/commonjs/funcs/census-validate-signal.d.ts +18 -0
  47. package/dist/commonjs/funcs/census-validate-signal.d.ts.map +1 -0
  48. package/dist/commonjs/funcs/census-validate-signal.js +114 -0
  49. package/dist/commonjs/funcs/census-validate-signal.js.map +1 -0
  50. package/dist/commonjs/funcs/census-verify-token.d.ts +18 -0
  51. package/dist/commonjs/funcs/census-verify-token.d.ts.map +1 -0
  52. package/dist/commonjs/funcs/census-verify-token.js +135 -0
  53. package/dist/commonjs/funcs/census-verify-token.js.map +1 -0
  54. package/dist/commonjs/funcs/verification-get-status.d.ts +18 -0
  55. package/dist/commonjs/funcs/verification-get-status.d.ts.map +1 -0
  56. package/dist/commonjs/funcs/verification-get-status.js +138 -0
  57. package/dist/commonjs/funcs/verification-get-status.js.map +1 -0
  58. package/dist/commonjs/hooks/hooks.d.ts +25 -0
  59. package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
  60. package/dist/commonjs/hooks/hooks.js +84 -0
  61. package/dist/commonjs/hooks/hooks.js.map +1 -0
  62. package/dist/commonjs/hooks/index.d.ts +3 -0
  63. package/dist/commonjs/hooks/index.d.ts.map +1 -0
  64. package/dist/commonjs/hooks/index.js +22 -0
  65. package/dist/commonjs/hooks/index.js.map +1 -0
  66. package/dist/commonjs/hooks/types.d.ts +77 -0
  67. package/dist/commonjs/hooks/types.d.ts.map +1 -0
  68. package/dist/commonjs/hooks/types.js +6 -0
  69. package/dist/commonjs/hooks/types.js.map +1 -0
  70. package/dist/commonjs/index.d.ts +6 -0
  71. package/dist/commonjs/index.d.ts.map +1 -0
  72. package/dist/commonjs/index.js +48 -0
  73. package/dist/commonjs/index.js.map +1 -0
  74. package/dist/commonjs/lib/base64.d.ts +10 -0
  75. package/dist/commonjs/lib/base64.d.ts.map +1 -0
  76. package/dist/commonjs/lib/base64.js +71 -0
  77. package/dist/commonjs/lib/base64.js.map +1 -0
  78. package/dist/commonjs/lib/config.d.ts +42 -0
  79. package/dist/commonjs/lib/config.d.ts.map +1 -0
  80. package/dist/commonjs/lib/config.js +42 -0
  81. package/dist/commonjs/lib/config.js.map +1 -0
  82. package/dist/commonjs/lib/encodings.d.ts +54 -0
  83. package/dist/commonjs/lib/encodings.d.ts.map +1 -0
  84. package/dist/commonjs/lib/encodings.js +406 -0
  85. package/dist/commonjs/lib/encodings.js.map +1 -0
  86. package/dist/commonjs/lib/files.d.ts +26 -0
  87. package/dist/commonjs/lib/files.d.ts.map +1 -0
  88. package/dist/commonjs/lib/files.js +96 -0
  89. package/dist/commonjs/lib/files.js.map +1 -0
  90. package/dist/commonjs/lib/http.d.ts +67 -0
  91. package/dist/commonjs/lib/http.d.ts.map +1 -0
  92. package/dist/commonjs/lib/http.js +219 -0
  93. package/dist/commonjs/lib/http.js.map +1 -0
  94. package/dist/commonjs/lib/logger.d.ts +6 -0
  95. package/dist/commonjs/lib/logger.d.ts.map +1 -0
  96. package/dist/commonjs/lib/logger.js +6 -0
  97. package/dist/commonjs/lib/logger.js.map +1 -0
  98. package/dist/commonjs/lib/matchers.d.ts +59 -0
  99. package/dist/commonjs/lib/matchers.d.ts.map +1 -0
  100. package/dist/commonjs/lib/matchers.js +221 -0
  101. package/dist/commonjs/lib/matchers.js.map +1 -0
  102. package/dist/commonjs/lib/primitives.d.ts +27 -0
  103. package/dist/commonjs/lib/primitives.d.ts.map +1 -0
  104. package/dist/commonjs/lib/primitives.js +129 -0
  105. package/dist/commonjs/lib/primitives.js.map +1 -0
  106. package/dist/commonjs/lib/retries.d.ts +38 -0
  107. package/dist/commonjs/lib/retries.d.ts.map +1 -0
  108. package/dist/commonjs/lib/retries.js +163 -0
  109. package/dist/commonjs/lib/retries.js.map +1 -0
  110. package/dist/commonjs/lib/schemas.d.ts +19 -0
  111. package/dist/commonjs/lib/schemas.d.ts.map +1 -0
  112. package/dist/commonjs/lib/schemas.js +62 -0
  113. package/dist/commonjs/lib/schemas.js.map +1 -0
  114. package/dist/commonjs/lib/sdks.d.ts +63 -0
  115. package/dist/commonjs/lib/sdks.d.ts.map +1 -0
  116. package/dist/commonjs/lib/sdks.js +294 -0
  117. package/dist/commonjs/lib/sdks.js.map +1 -0
  118. package/dist/commonjs/lib/security.d.ts +84 -0
  119. package/dist/commonjs/lib/security.d.ts.map +1 -0
  120. package/dist/commonjs/lib/security.js +167 -0
  121. package/dist/commonjs/lib/security.js.map +1 -0
  122. package/dist/commonjs/lib/url.d.ts +5 -0
  123. package/dist/commonjs/lib/url.d.ts.map +1 -0
  124. package/dist/commonjs/lib/url.js +27 -0
  125. package/dist/commonjs/lib/url.js.map +1 -0
  126. package/dist/commonjs/mcp-server/cli/start/command.d.ts +2 -0
  127. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -0
  128. package/dist/commonjs/mcp-server/cli/start/command.js +149 -0
  129. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -0
  130. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +20 -0
  131. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -0
  132. package/dist/commonjs/mcp-server/cli/start/impl.js +112 -0
  133. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -0
  134. package/dist/commonjs/mcp-server/cli.d.ts +6 -0
  135. package/dist/commonjs/mcp-server/cli.d.ts.map +1 -0
  136. package/dist/commonjs/mcp-server/cli.js +10 -0
  137. package/dist/commonjs/mcp-server/cli.js.map +1 -0
  138. package/dist/commonjs/mcp-server/console-logger.d.ts +7 -0
  139. package/dist/commonjs/mcp-server/console-logger.d.ts.map +1 -0
  140. package/dist/commonjs/mcp-server/console-logger.js +59 -0
  141. package/dist/commonjs/mcp-server/console-logger.js.map +1 -0
  142. package/dist/commonjs/mcp-server/extensions.d.ts +11 -0
  143. package/dist/commonjs/mcp-server/extensions.d.ts.map +1 -0
  144. package/dist/commonjs/mcp-server/extensions.js +6 -0
  145. package/dist/commonjs/mcp-server/extensions.js.map +1 -0
  146. package/dist/commonjs/mcp-server/mcp-server.d.ts +2 -0
  147. package/dist/commonjs/mcp-server/mcp-server.d.ts.map +1 -0
  148. package/dist/commonjs/mcp-server/mcp-server.js +29 -0
  149. package/dist/commonjs/mcp-server/mcp-server.js.map +1 -0
  150. package/dist/commonjs/mcp-server/prompts.d.ts +26 -0
  151. package/dist/commonjs/mcp-server/prompts.d.ts.map +1 -0
  152. package/dist/commonjs/mcp-server/prompts.js +51 -0
  153. package/dist/commonjs/mcp-server/prompts.js.map +1 -0
  154. package/dist/commonjs/mcp-server/resources.d.ts +32 -0
  155. package/dist/commonjs/mcp-server/resources.d.ts.map +1 -0
  156. package/dist/commonjs/mcp-server/resources.js +87 -0
  157. package/dist/commonjs/mcp-server/resources.js.map +1 -0
  158. package/dist/commonjs/mcp-server/scopes.d.ts +3 -0
  159. package/dist/commonjs/mcp-server/scopes.d.ts.map +1 -0
  160. package/dist/commonjs/mcp-server/scopes.js +10 -0
  161. package/dist/commonjs/mcp-server/scopes.js.map +1 -0
  162. package/dist/commonjs/mcp-server/server.d.ts +13 -0
  163. package/dist/commonjs/mcp-server/server.d.ts.map +1 -0
  164. package/dist/commonjs/mcp-server/server.js +38 -0
  165. package/dist/commonjs/mcp-server/server.js.map +1 -0
  166. package/dist/commonjs/mcp-server/shared.d.ts +7 -0
  167. package/dist/commonjs/mcp-server/shared.d.ts.map +1 -0
  168. package/dist/commonjs/mcp-server/shared.js +98 -0
  169. package/dist/commonjs/mcp-server/shared.js.map +1 -0
  170. package/dist/commonjs/mcp-server/tools/actions-cancel-action.d.ts +8 -0
  171. package/dist/commonjs/mcp-server/tools/actions-cancel-action.d.ts.map +1 -0
  172. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js +63 -0
  173. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js.map +1 -0
  174. package/dist/commonjs/mcp-server/tools/actions-check-action-status.d.ts +8 -0
  175. package/dist/commonjs/mcp-server/tools/actions-check-action-status.d.ts.map +1 -0
  176. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js +63 -0
  177. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js.map +1 -0
  178. package/dist/commonjs/mcp-server/tools/actions-propose-action.d.ts +8 -0
  179. package/dist/commonjs/mcp-server/tools/actions-propose-action.d.ts.map +1 -0
  180. package/dist/commonjs/mcp-server/tools/actions-propose-action.js +63 -0
  181. package/dist/commonjs/mcp-server/tools/actions-propose-action.js.map +1 -0
  182. package/dist/commonjs/mcp-server/tools.d.ts +25 -0
  183. package/dist/commonjs/mcp-server/tools.d.ts.map +1 -0
  184. package/dist/commonjs/mcp-server/tools.js +82 -0
  185. package/dist/commonjs/mcp-server/tools.js.map +1 -0
  186. package/dist/commonjs/models/error-body.d.ts +56 -0
  187. package/dist/commonjs/models/error-body.d.ts.map +1 -0
  188. package/dist/commonjs/models/error-body.js +100 -0
  189. package/dist/commonjs/models/error-body.js.map +1 -0
  190. package/dist/commonjs/models/error-response.d.ts +19 -0
  191. package/dist/commonjs/models/error-response.d.ts.map +1 -0
  192. package/dist/commonjs/models/error-response.js +61 -0
  193. package/dist/commonjs/models/error-response.js.map +1 -0
  194. package/dist/commonjs/models/errors/bot-shield-default-error.d.ts +10 -0
  195. package/dist/commonjs/models/errors/bot-shield-default-error.d.ts.map +1 -0
  196. package/dist/commonjs/models/errors/bot-shield-default-error.js +34 -0
  197. package/dist/commonjs/models/errors/bot-shield-default-error.js.map +1 -0
  198. package/dist/commonjs/models/errors/bot-shield-error.d.ts +19 -0
  199. package/dist/commonjs/models/errors/bot-shield-error.d.ts.map +1 -0
  200. package/dist/commonjs/models/errors/bot-shield-error.js +30 -0
  201. package/dist/commonjs/models/errors/bot-shield-error.js.map +1 -0
  202. package/dist/commonjs/models/errors/error-response.d.ts +31 -0
  203. package/dist/commonjs/models/errors/error-response.d.ts.map +1 -0
  204. package/dist/commonjs/models/errors/error-response.js +80 -0
  205. package/dist/commonjs/models/errors/error-response.js.map +1 -0
  206. package/dist/commonjs/models/errors/http-client-errors.d.ts +44 -0
  207. package/dist/commonjs/models/errors/http-client-errors.d.ts.map +1 -0
  208. package/dist/commonjs/models/errors/http-client-errors.js +65 -0
  209. package/dist/commonjs/models/errors/http-client-errors.js.map +1 -0
  210. package/dist/commonjs/models/errors/index.d.ts +8 -0
  211. package/dist/commonjs/models/errors/index.d.ts.map +1 -0
  212. package/dist/commonjs/models/errors/index.js +27 -0
  213. package/dist/commonjs/models/errors/index.js.map +1 -0
  214. package/dist/commonjs/models/errors/invalid-input-error.d.ts +42 -0
  215. package/dist/commonjs/models/errors/invalid-input-error.d.ts.map +1 -0
  216. package/dist/commonjs/models/errors/invalid-input-error.js +86 -0
  217. package/dist/commonjs/models/errors/invalid-input-error.js.map +1 -0
  218. package/dist/commonjs/models/errors/response-validation-error.d.ts +26 -0
  219. package/dist/commonjs/models/errors/response-validation-error.d.ts.map +1 -0
  220. package/dist/commonjs/models/errors/response-validation-error.js +74 -0
  221. package/dist/commonjs/models/errors/response-validation-error.js.map +1 -0
  222. package/dist/commonjs/models/errors/sdk-validation-error.d.ts +21 -0
  223. package/dist/commonjs/models/errors/sdk-validation-error.d.ts.map +1 -0
  224. package/dist/commonjs/models/errors/sdk-validation-error.js +137 -0
  225. package/dist/commonjs/models/errors/sdk-validation-error.js.map +1 -0
  226. package/dist/commonjs/models/index.d.ts +5 -0
  227. package/dist/commonjs/models/index.d.ts.map +1 -0
  228. package/dist/commonjs/models/index.js +24 -0
  229. package/dist/commonjs/models/index.js.map +1 -0
  230. package/dist/commonjs/models/invalid-input-error.d.ts +24 -0
  231. package/dist/commonjs/models/invalid-input-error.d.ts.map +1 -0
  232. package/dist/commonjs/models/invalid-input-error.js +63 -0
  233. package/dist/commonjs/models/invalid-input-error.js.map +1 -0
  234. package/dist/commonjs/models/operations/actions-cancel.d.ts +104 -0
  235. package/dist/commonjs/models/operations/actions-cancel.d.ts.map +1 -0
  236. package/dist/commonjs/models/operations/actions-cancel.js +154 -0
  237. package/dist/commonjs/models/operations/actions-cancel.js.map +1 -0
  238. package/dist/commonjs/models/operations/actions-check-status.d.ts +121 -0
  239. package/dist/commonjs/models/operations/actions-check-status.d.ts.map +1 -0
  240. package/dist/commonjs/models/operations/actions-check-status.js +176 -0
  241. package/dist/commonjs/models/operations/actions-check-status.js.map +1 -0
  242. package/dist/commonjs/models/operations/actions-propose.d.ts +187 -0
  243. package/dist/commonjs/models/operations/actions-propose.d.ts.map +1 -0
  244. package/dist/commonjs/models/operations/actions-propose.js +227 -0
  245. package/dist/commonjs/models/operations/actions-propose.js.map +1 -0
  246. package/dist/commonjs/models/operations/index.d.ts +13 -0
  247. package/dist/commonjs/models/operations/index.d.ts.map +1 -0
  248. package/dist/commonjs/models/operations/index.js +32 -0
  249. package/dist/commonjs/models/operations/index.js.map +1 -0
  250. package/dist/commonjs/models/operations/sdk-create-session.d.ts +139 -0
  251. package/dist/commonjs/models/operations/sdk-create-session.d.ts.map +1 -0
  252. package/dist/commonjs/models/operations/sdk-create-session.js +205 -0
  253. package/dist/commonjs/models/operations/sdk-create-session.js.map +1 -0
  254. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +210 -0
  255. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -0
  256. package/dist/commonjs/models/operations/sdk-create-verification-link.js +270 -0
  257. package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -0
  258. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts +128 -0
  259. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts.map +1 -0
  260. package/dist/commonjs/models/operations/sdk-get-partner-config.js +181 -0
  261. package/dist/commonjs/models/operations/sdk-get-partner-config.js.map +1 -0
  262. package/dist/commonjs/models/operations/sdk-logout.d.ts +74 -0
  263. package/dist/commonjs/models/operations/sdk-logout.d.ts.map +1 -0
  264. package/dist/commonjs/models/operations/sdk-logout.js +143 -0
  265. package/dist/commonjs/models/operations/sdk-logout.js.map +1 -0
  266. package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts +97 -0
  267. package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts.map +1 -0
  268. package/dist/commonjs/models/operations/sdk-revoke-verification.js +161 -0
  269. package/dist/commonjs/models/operations/sdk-revoke-verification.js.map +1 -0
  270. package/dist/commonjs/models/operations/sdk-store-signal.d.ts +93 -0
  271. package/dist/commonjs/models/operations/sdk-store-signal.d.ts.map +1 -0
  272. package/dist/commonjs/models/operations/sdk-store-signal.js +155 -0
  273. package/dist/commonjs/models/operations/sdk-store-signal.js.map +1 -0
  274. package/dist/commonjs/models/operations/sdk-validate-signal.d.ts +101 -0
  275. package/dist/commonjs/models/operations/sdk-validate-signal.d.ts.map +1 -0
  276. package/dist/commonjs/models/operations/sdk-validate-signal.js +164 -0
  277. package/dist/commonjs/models/operations/sdk-validate-signal.js.map +1 -0
  278. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +122 -0
  279. package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -0
  280. package/dist/commonjs/models/operations/sdk-verify-token.js +188 -0
  281. package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -0
  282. package/dist/commonjs/models/operations/verification-get-status.d.ts +153 -0
  283. package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -0
  284. package/dist/commonjs/models/operations/verification-get-status.js +234 -0
  285. package/dist/commonjs/models/operations/verification-get-status.js.map +1 -0
  286. package/dist/commonjs/models/security.d.ts +21 -0
  287. package/dist/commonjs/models/security.d.ts.map +1 -0
  288. package/dist/commonjs/models/security.js +63 -0
  289. package/dist/commonjs/models/security.js.map +1 -0
  290. package/dist/commonjs/package.json +3 -0
  291. package/dist/commonjs/sdk/actions.d.ts +26 -0
  292. package/dist/commonjs/sdk/actions.d.ts.map +1 -0
  293. package/dist/commonjs/sdk/actions.js +42 -0
  294. package/dist/commonjs/sdk/actions.js.map +1 -0
  295. package/dist/commonjs/sdk/census.d.ts +58 -0
  296. package/dist/commonjs/sdk/census.d.ts.map +1 -0
  297. package/dist/commonjs/sdk/census.js +89 -0
  298. package/dist/commonjs/sdk/census.js.map +1 -0
  299. package/dist/commonjs/sdk/index.d.ts +2 -0
  300. package/dist/commonjs/sdk/index.d.ts.map +1 -0
  301. package/dist/commonjs/sdk/index.js +21 -0
  302. package/dist/commonjs/sdk/index.js.map +1 -0
  303. package/dist/commonjs/sdk/sdk.d.ts +13 -0
  304. package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
  305. package/dist/commonjs/sdk/sdk.js +26 -0
  306. package/dist/commonjs/sdk/sdk.js.map +1 -0
  307. package/dist/commonjs/sdk/verification.d.ts +12 -0
  308. package/dist/commonjs/sdk/verification.d.ts.map +1 -0
  309. package/dist/commonjs/sdk/verification.js +22 -0
  310. package/dist/commonjs/sdk/verification.js.map +1 -0
  311. package/dist/commonjs/types/async.d.ts +23 -0
  312. package/dist/commonjs/types/async.d.ts.map +1 -0
  313. package/dist/commonjs/types/async.js +32 -0
  314. package/dist/commonjs/types/async.js.map +1 -0
  315. package/dist/commonjs/types/blobs.d.ts +4 -0
  316. package/dist/commonjs/types/blobs.d.ts.map +1 -0
  317. package/dist/commonjs/types/blobs.js +62 -0
  318. package/dist/commonjs/types/blobs.js.map +1 -0
  319. package/dist/commonjs/types/const-date-time.d.ts +3 -0
  320. package/dist/commonjs/types/const-date-time.d.ts.map +1 -0
  321. package/dist/commonjs/types/const-date-time.js +46 -0
  322. package/dist/commonjs/types/const-date-time.js.map +1 -0
  323. package/dist/commonjs/types/default-to-zero-value.d.ts +12 -0
  324. package/dist/commonjs/types/default-to-zero-value.d.ts.map +1 -0
  325. package/dist/commonjs/types/default-to-zero-value.js +35 -0
  326. package/dist/commonjs/types/default-to-zero-value.js.map +1 -0
  327. package/dist/commonjs/types/enums.d.ts +9 -0
  328. package/dist/commonjs/types/enums.d.ts.map +1 -0
  329. package/dist/commonjs/types/enums.js +66 -0
  330. package/dist/commonjs/types/enums.js.map +1 -0
  331. package/dist/commonjs/types/fp.d.ts +31 -0
  332. package/dist/commonjs/types/fp.d.ts.map +1 -0
  333. package/dist/commonjs/types/fp.js +37 -0
  334. package/dist/commonjs/types/fp.js.map +1 -0
  335. package/dist/commonjs/types/index.d.ts +10 -0
  336. package/dist/commonjs/types/index.d.ts.map +1 -0
  337. package/dist/commonjs/types/index.js +31 -0
  338. package/dist/commonjs/types/index.js.map +1 -0
  339. package/dist/commonjs/types/operations.d.ts +27 -0
  340. package/dist/commonjs/types/operations.d.ts.map +1 -0
  341. package/dist/commonjs/types/operations.js +83 -0
  342. package/dist/commonjs/types/operations.js.map +1 -0
  343. package/dist/commonjs/types/primitives.d.ts +9 -0
  344. package/dist/commonjs/types/primitives.d.ts.map +1 -0
  345. package/dist/commonjs/types/primitives.js +147 -0
  346. package/dist/commonjs/types/primitives.js.map +1 -0
  347. package/dist/commonjs/types/rfcdate.d.ts +21 -0
  348. package/dist/commonjs/types/rfcdate.d.ts.map +1 -0
  349. package/dist/commonjs/types/rfcdate.js +47 -0
  350. package/dist/commonjs/types/rfcdate.js.map +1 -0
  351. package/dist/commonjs/types/smart-union.d.ts +7 -0
  352. package/dist/commonjs/types/smart-union.d.ts.map +1 -0
  353. package/dist/commonjs/types/smart-union.js +152 -0
  354. package/dist/commonjs/types/smart-union.js.map +1 -0
  355. package/dist/commonjs/types/streams.d.ts +2 -0
  356. package/dist/commonjs/types/streams.d.ts.map +1 -0
  357. package/dist/commonjs/types/streams.js +18 -0
  358. package/dist/commonjs/types/streams.js.map +1 -0
  359. package/dist/commonjs/types/unrecognized.d.ts +16 -0
  360. package/dist/commonjs/types/unrecognized.d.ts.map +1 -0
  361. package/dist/commonjs/types/unrecognized.js +34 -0
  362. package/dist/commonjs/types/unrecognized.js.map +1 -0
  363. package/dist/esm/core.d.ts +10 -0
  364. package/dist/esm/core.d.ts.map +1 -0
  365. package/dist/esm/core.js +13 -0
  366. package/dist/esm/core.js.map +1 -0
  367. package/dist/esm/funcs/actions-cancel-action.d.ts +18 -0
  368. package/dist/esm/funcs/actions-cancel-action.d.ts.map +1 -0
  369. package/dist/esm/funcs/actions-cancel-action.js +82 -0
  370. package/dist/esm/funcs/actions-cancel-action.js.map +1 -0
  371. package/dist/esm/funcs/actions-check-action-status.d.ts +18 -0
  372. package/dist/esm/funcs/actions-check-action-status.d.ts.map +1 -0
  373. package/dist/esm/funcs/actions-check-action-status.js +86 -0
  374. package/dist/esm/funcs/actions-check-action-status.js.map +1 -0
  375. package/dist/esm/funcs/actions-propose-action.d.ts +18 -0
  376. package/dist/esm/funcs/actions-propose-action.d.ts.map +1 -0
  377. package/dist/esm/funcs/actions-propose-action.js +82 -0
  378. package/dist/esm/funcs/actions-propose-action.js.map +1 -0
  379. package/dist/esm/funcs/census-create-session.d.ts +18 -0
  380. package/dist/esm/funcs/census-create-session.d.ts.map +1 -0
  381. package/dist/esm/funcs/census-create-session.js +87 -0
  382. package/dist/esm/funcs/census-create-session.js.map +1 -0
  383. package/dist/esm/funcs/census-create-verification-link.d.ts +18 -0
  384. package/dist/esm/funcs/census-create-verification-link.d.ts.map +1 -0
  385. package/dist/esm/funcs/census-create-verification-link.js +87 -0
  386. package/dist/esm/funcs/census-create-verification-link.js.map +1 -0
  387. package/dist/esm/funcs/census-get-partner-config.d.ts +18 -0
  388. package/dist/esm/funcs/census-get-partner-config.d.ts.map +1 -0
  389. package/dist/esm/funcs/census-get-partner-config.js +102 -0
  390. package/dist/esm/funcs/census-get-partner-config.js.map +1 -0
  391. package/dist/esm/funcs/census-logout.d.ts +15 -0
  392. package/dist/esm/funcs/census-logout.d.ts.map +1 -0
  393. package/dist/esm/funcs/census-logout.js +84 -0
  394. package/dist/esm/funcs/census-logout.js.map +1 -0
  395. package/dist/esm/funcs/census-revoke-verification.d.ts +18 -0
  396. package/dist/esm/funcs/census-revoke-verification.d.ts.map +1 -0
  397. package/dist/esm/funcs/census-revoke-verification.js +87 -0
  398. package/dist/esm/funcs/census-revoke-verification.js.map +1 -0
  399. package/dist/esm/funcs/census-store-signal.d.ts +18 -0
  400. package/dist/esm/funcs/census-store-signal.d.ts.map +1 -0
  401. package/dist/esm/funcs/census-store-signal.js +78 -0
  402. package/dist/esm/funcs/census-store-signal.js.map +1 -0
  403. package/dist/esm/funcs/census-validate-signal.d.ts +18 -0
  404. package/dist/esm/funcs/census-validate-signal.d.ts.map +1 -0
  405. package/dist/esm/funcs/census-validate-signal.js +78 -0
  406. package/dist/esm/funcs/census-validate-signal.js.map +1 -0
  407. package/dist/esm/funcs/census-verify-token.d.ts +18 -0
  408. package/dist/esm/funcs/census-verify-token.d.ts.map +1 -0
  409. package/dist/esm/funcs/census-verify-token.js +99 -0
  410. package/dist/esm/funcs/census-verify-token.js.map +1 -0
  411. package/dist/esm/funcs/verification-get-status.d.ts +18 -0
  412. package/dist/esm/funcs/verification-get-status.d.ts.map +1 -0
  413. package/dist/esm/funcs/verification-get-status.js +102 -0
  414. package/dist/esm/funcs/verification-get-status.js.map +1 -0
  415. package/dist/esm/hooks/hooks.d.ts +25 -0
  416. package/dist/esm/hooks/hooks.d.ts.map +1 -0
  417. package/dist/esm/hooks/hooks.js +80 -0
  418. package/dist/esm/hooks/hooks.js.map +1 -0
  419. package/dist/esm/hooks/index.d.ts +3 -0
  420. package/dist/esm/hooks/index.d.ts.map +1 -0
  421. package/dist/esm/hooks/index.js +6 -0
  422. package/dist/esm/hooks/index.js.map +1 -0
  423. package/dist/esm/hooks/types.d.ts +77 -0
  424. package/dist/esm/hooks/types.d.ts.map +1 -0
  425. package/dist/esm/hooks/types.js +5 -0
  426. package/dist/esm/hooks/types.js.map +1 -0
  427. package/dist/esm/index.d.ts +6 -0
  428. package/dist/esm/index.d.ts.map +1 -0
  429. package/dist/esm/index.js +8 -0
  430. package/dist/esm/index.js.map +1 -0
  431. package/dist/esm/lib/base64.d.ts +10 -0
  432. package/dist/esm/lib/base64.d.ts.map +1 -0
  433. package/dist/esm/lib/base64.js +29 -0
  434. package/dist/esm/lib/base64.js.map +1 -0
  435. package/dist/esm/lib/config.d.ts +42 -0
  436. package/dist/esm/lib/config.d.ts.map +1 -0
  437. package/dist/esm/lib/config.js +38 -0
  438. package/dist/esm/lib/config.js.map +1 -0
  439. package/dist/esm/lib/encodings.d.ts +54 -0
  440. package/dist/esm/lib/encodings.d.ts.map +1 -0
  441. package/dist/esm/lib/encodings.js +391 -0
  442. package/dist/esm/lib/encodings.js.map +1 -0
  443. package/dist/esm/lib/files.d.ts +26 -0
  444. package/dist/esm/lib/files.d.ts.map +1 -0
  445. package/dist/esm/lib/files.js +91 -0
  446. package/dist/esm/lib/files.js.map +1 -0
  447. package/dist/esm/lib/http.d.ts +67 -0
  448. package/dist/esm/lib/http.d.ts.map +1 -0
  449. package/dist/esm/lib/http.js +209 -0
  450. package/dist/esm/lib/http.js.map +1 -0
  451. package/dist/esm/lib/logger.d.ts +6 -0
  452. package/dist/esm/lib/logger.d.ts.map +1 -0
  453. package/dist/esm/lib/logger.js +5 -0
  454. package/dist/esm/lib/logger.js.map +1 -0
  455. package/dist/esm/lib/matchers.d.ts +59 -0
  456. package/dist/esm/lib/matchers.d.ts.map +1 -0
  457. package/dist/esm/lib/matchers.js +202 -0
  458. package/dist/esm/lib/matchers.js.map +1 -0
  459. package/dist/esm/lib/primitives.d.ts +27 -0
  460. package/dist/esm/lib/primitives.d.ts.map +1 -0
  461. package/dist/esm/lib/primitives.js +120 -0
  462. package/dist/esm/lib/primitives.js.map +1 -0
  463. package/dist/esm/lib/retries.d.ts +38 -0
  464. package/dist/esm/lib/retries.d.ts.map +1 -0
  465. package/dist/esm/lib/retries.js +157 -0
  466. package/dist/esm/lib/retries.js.map +1 -0
  467. package/dist/esm/lib/schemas.d.ts +19 -0
  468. package/dist/esm/lib/schemas.d.ts.map +1 -0
  469. package/dist/esm/lib/schemas.js +57 -0
  470. package/dist/esm/lib/schemas.js.map +1 -0
  471. package/dist/esm/lib/sdks.d.ts +63 -0
  472. package/dist/esm/lib/sdks.d.ts.map +1 -0
  473. package/dist/esm/lib/sdks.js +290 -0
  474. package/dist/esm/lib/sdks.js.map +1 -0
  475. package/dist/esm/lib/security.d.ts +84 -0
  476. package/dist/esm/lib/security.d.ts.map +1 -0
  477. package/dist/esm/lib/security.js +160 -0
  478. package/dist/esm/lib/security.js.map +1 -0
  479. package/dist/esm/lib/url.d.ts +5 -0
  480. package/dist/esm/lib/url.d.ts.map +1 -0
  481. package/dist/esm/lib/url.js +24 -0
  482. package/dist/esm/lib/url.js.map +1 -0
  483. package/dist/esm/mcp-server/build.d.mts.map +1 -0
  484. package/dist/esm/mcp-server/build.mjs +14 -0
  485. package/dist/esm/mcp-server/build.mjs.map +1 -0
  486. package/dist/esm/mcp-server/cli/start/command.d.ts +2 -0
  487. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -0
  488. package/dist/esm/mcp-server/cli/start/command.js +113 -0
  489. package/dist/esm/mcp-server/cli/start/command.js.map +1 -0
  490. package/dist/esm/mcp-server/cli/start/impl.d.ts +20 -0
  491. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -0
  492. package/dist/esm/mcp-server/cli/start/impl.js +106 -0
  493. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -0
  494. package/dist/esm/mcp-server/cli.d.ts +6 -0
  495. package/dist/esm/mcp-server/cli.d.ts.map +1 -0
  496. package/dist/esm/mcp-server/cli.js +7 -0
  497. package/dist/esm/mcp-server/cli.js.map +1 -0
  498. package/dist/esm/mcp-server/console-logger.d.ts +7 -0
  499. package/dist/esm/mcp-server/console-logger.d.ts.map +1 -0
  500. package/dist/esm/mcp-server/console-logger.js +55 -0
  501. package/dist/esm/mcp-server/console-logger.js.map +1 -0
  502. package/dist/esm/mcp-server/extensions.d.ts +11 -0
  503. package/dist/esm/mcp-server/extensions.d.ts.map +1 -0
  504. package/dist/esm/mcp-server/extensions.js +5 -0
  505. package/dist/esm/mcp-server/extensions.js.map +1 -0
  506. package/dist/esm/mcp-server/mcp-server.d.ts +2 -0
  507. package/dist/esm/mcp-server/mcp-server.d.ts.map +1 -0
  508. package/dist/esm/mcp-server/mcp-server.js +23 -0
  509. package/dist/esm/mcp-server/mcp-server.js.map +1 -0
  510. package/dist/esm/mcp-server/prompts.d.ts +26 -0
  511. package/dist/esm/mcp-server/prompts.d.ts.map +1 -0
  512. package/dist/esm/mcp-server/prompts.js +47 -0
  513. package/dist/esm/mcp-server/prompts.js.map +1 -0
  514. package/dist/esm/mcp-server/resources.d.ts +32 -0
  515. package/dist/esm/mcp-server/resources.d.ts.map +1 -0
  516. package/dist/esm/mcp-server/resources.js +82 -0
  517. package/dist/esm/mcp-server/resources.js.map +1 -0
  518. package/dist/esm/mcp-server/scopes.d.ts +3 -0
  519. package/dist/esm/mcp-server/scopes.d.ts.map +1 -0
  520. package/dist/esm/mcp-server/scopes.js +7 -0
  521. package/dist/esm/mcp-server/scopes.js.map +1 -0
  522. package/dist/esm/mcp-server/server.d.ts +13 -0
  523. package/dist/esm/mcp-server/server.d.ts.map +1 -0
  524. package/dist/esm/mcp-server/server.js +35 -0
  525. package/dist/esm/mcp-server/server.js.map +1 -0
  526. package/dist/esm/mcp-server/shared.d.ts +7 -0
  527. package/dist/esm/mcp-server/shared.d.ts.map +1 -0
  528. package/dist/esm/mcp-server/shared.js +59 -0
  529. package/dist/esm/mcp-server/shared.js.map +1 -0
  530. package/dist/esm/mcp-server/tools/actions-cancel-action.d.ts +8 -0
  531. package/dist/esm/mcp-server/tools/actions-cancel-action.d.ts.map +1 -0
  532. package/dist/esm/mcp-server/tools/actions-cancel-action.js +27 -0
  533. package/dist/esm/mcp-server/tools/actions-cancel-action.js.map +1 -0
  534. package/dist/esm/mcp-server/tools/actions-check-action-status.d.ts +8 -0
  535. package/dist/esm/mcp-server/tools/actions-check-action-status.d.ts.map +1 -0
  536. package/dist/esm/mcp-server/tools/actions-check-action-status.js +27 -0
  537. package/dist/esm/mcp-server/tools/actions-check-action-status.js.map +1 -0
  538. package/dist/esm/mcp-server/tools/actions-propose-action.d.ts +8 -0
  539. package/dist/esm/mcp-server/tools/actions-propose-action.d.ts.map +1 -0
  540. package/dist/esm/mcp-server/tools/actions-propose-action.js +27 -0
  541. package/dist/esm/mcp-server/tools/actions-propose-action.js.map +1 -0
  542. package/dist/esm/mcp-server/tools.d.ts +25 -0
  543. package/dist/esm/mcp-server/tools.d.ts.map +1 -0
  544. package/dist/esm/mcp-server/tools.js +78 -0
  545. package/dist/esm/mcp-server/tools.js.map +1 -0
  546. package/dist/esm/models/error-body.d.ts +56 -0
  547. package/dist/esm/models/error-body.d.ts.map +1 -0
  548. package/dist/esm/models/error-body.js +60 -0
  549. package/dist/esm/models/error-body.js.map +1 -0
  550. package/dist/esm/models/error-response.d.ts +19 -0
  551. package/dist/esm/models/error-response.d.ts.map +1 -0
  552. package/dist/esm/models/error-response.js +23 -0
  553. package/dist/esm/models/error-response.js.map +1 -0
  554. package/dist/esm/models/errors/bot-shield-default-error.d.ts +10 -0
  555. package/dist/esm/models/errors/bot-shield-default-error.d.ts.map +1 -0
  556. package/dist/esm/models/errors/bot-shield-default-error.js +30 -0
  557. package/dist/esm/models/errors/bot-shield-default-error.js.map +1 -0
  558. package/dist/esm/models/errors/bot-shield-error.d.ts +19 -0
  559. package/dist/esm/models/errors/bot-shield-error.d.ts.map +1 -0
  560. package/dist/esm/models/errors/bot-shield-error.js +26 -0
  561. package/dist/esm/models/errors/bot-shield-error.js.map +1 -0
  562. package/dist/esm/models/errors/error-response.d.ts +31 -0
  563. package/dist/esm/models/errors/error-response.d.ts.map +1 -0
  564. package/dist/esm/models/errors/error-response.js +43 -0
  565. package/dist/esm/models/errors/error-response.js.map +1 -0
  566. package/dist/esm/models/errors/http-client-errors.d.ts +44 -0
  567. package/dist/esm/models/errors/http-client-errors.d.ts.map +1 -0
  568. package/dist/esm/models/errors/http-client-errors.js +56 -0
  569. package/dist/esm/models/errors/http-client-errors.js.map +1 -0
  570. package/dist/esm/models/errors/index.d.ts +8 -0
  571. package/dist/esm/models/errors/index.d.ts.map +1 -0
  572. package/dist/esm/models/errors/index.js +11 -0
  573. package/dist/esm/models/errors/index.js.map +1 -0
  574. package/dist/esm/models/errors/invalid-input-error.d.ts +42 -0
  575. package/dist/esm/models/errors/invalid-input-error.d.ts.map +1 -0
  576. package/dist/esm/models/errors/invalid-input-error.js +49 -0
  577. package/dist/esm/models/errors/invalid-input-error.js.map +1 -0
  578. package/dist/esm/models/errors/response-validation-error.d.ts +26 -0
  579. package/dist/esm/models/errors/response-validation-error.d.ts.map +1 -0
  580. package/dist/esm/models/errors/response-validation-error.js +37 -0
  581. package/dist/esm/models/errors/response-validation-error.js.map +1 -0
  582. package/dist/esm/models/errors/sdk-validation-error.d.ts +21 -0
  583. package/dist/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
  584. package/dist/esm/models/errors/sdk-validation-error.js +99 -0
  585. package/dist/esm/models/errors/sdk-validation-error.js.map +1 -0
  586. package/dist/esm/models/index.d.ts +5 -0
  587. package/dist/esm/models/index.d.ts.map +1 -0
  588. package/dist/esm/models/index.js +8 -0
  589. package/dist/esm/models/index.js.map +1 -0
  590. package/dist/esm/models/invalid-input-error.d.ts +24 -0
  591. package/dist/esm/models/invalid-input-error.d.ts.map +1 -0
  592. package/dist/esm/models/invalid-input-error.js +25 -0
  593. package/dist/esm/models/invalid-input-error.js.map +1 -0
  594. package/dist/esm/models/operations/actions-cancel.d.ts +104 -0
  595. package/dist/esm/models/operations/actions-cancel.d.ts.map +1 -0
  596. package/dist/esm/models/operations/actions-cancel.js +110 -0
  597. package/dist/esm/models/operations/actions-cancel.js.map +1 -0
  598. package/dist/esm/models/operations/actions-check-status.d.ts +121 -0
  599. package/dist/esm/models/operations/actions-check-status.d.ts.map +1 -0
  600. package/dist/esm/models/operations/actions-check-status.js +132 -0
  601. package/dist/esm/models/operations/actions-check-status.js.map +1 -0
  602. package/dist/esm/models/operations/actions-propose.d.ts +187 -0
  603. package/dist/esm/models/operations/actions-propose.d.ts.map +1 -0
  604. package/dist/esm/models/operations/actions-propose.js +179 -0
  605. package/dist/esm/models/operations/actions-propose.js.map +1 -0
  606. package/dist/esm/models/operations/index.d.ts +13 -0
  607. package/dist/esm/models/operations/index.d.ts.map +1 -0
  608. package/dist/esm/models/operations/index.js +16 -0
  609. package/dist/esm/models/operations/index.js.map +1 -0
  610. package/dist/esm/models/operations/sdk-create-session.d.ts +139 -0
  611. package/dist/esm/models/operations/sdk-create-session.d.ts.map +1 -0
  612. package/dist/esm/models/operations/sdk-create-session.js +157 -0
  613. package/dist/esm/models/operations/sdk-create-session.js.map +1 -0
  614. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +210 -0
  615. package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -0
  616. package/dist/esm/models/operations/sdk-create-verification-link.js +222 -0
  617. package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -0
  618. package/dist/esm/models/operations/sdk-get-partner-config.d.ts +128 -0
  619. package/dist/esm/models/operations/sdk-get-partner-config.d.ts.map +1 -0
  620. package/dist/esm/models/operations/sdk-get-partner-config.js +133 -0
  621. package/dist/esm/models/operations/sdk-get-partner-config.js.map +1 -0
  622. package/dist/esm/models/operations/sdk-logout.d.ts +74 -0
  623. package/dist/esm/models/operations/sdk-logout.d.ts.map +1 -0
  624. package/dist/esm/models/operations/sdk-logout.js +99 -0
  625. package/dist/esm/models/operations/sdk-logout.js.map +1 -0
  626. package/dist/esm/models/operations/sdk-revoke-verification.d.ts +97 -0
  627. package/dist/esm/models/operations/sdk-revoke-verification.d.ts.map +1 -0
  628. package/dist/esm/models/operations/sdk-revoke-verification.js +115 -0
  629. package/dist/esm/models/operations/sdk-revoke-verification.js.map +1 -0
  630. package/dist/esm/models/operations/sdk-store-signal.d.ts +93 -0
  631. package/dist/esm/models/operations/sdk-store-signal.d.ts.map +1 -0
  632. package/dist/esm/models/operations/sdk-store-signal.js +111 -0
  633. package/dist/esm/models/operations/sdk-store-signal.js.map +1 -0
  634. package/dist/esm/models/operations/sdk-validate-signal.d.ts +101 -0
  635. package/dist/esm/models/operations/sdk-validate-signal.d.ts.map +1 -0
  636. package/dist/esm/models/operations/sdk-validate-signal.js +120 -0
  637. package/dist/esm/models/operations/sdk-validate-signal.js.map +1 -0
  638. package/dist/esm/models/operations/sdk-verify-token.d.ts +122 -0
  639. package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -0
  640. package/dist/esm/models/operations/sdk-verify-token.js +140 -0
  641. package/dist/esm/models/operations/sdk-verify-token.js.map +1 -0
  642. package/dist/esm/models/operations/verification-get-status.d.ts +153 -0
  643. package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -0
  644. package/dist/esm/models/operations/verification-get-status.js +188 -0
  645. package/dist/esm/models/operations/verification-get-status.js.map +1 -0
  646. package/dist/esm/models/security.d.ts +21 -0
  647. package/dist/esm/models/security.d.ts.map +1 -0
  648. package/dist/esm/models/security.js +25 -0
  649. package/dist/esm/models/security.js.map +1 -0
  650. package/dist/esm/package.json +3 -0
  651. package/dist/esm/sdk/actions.d.ts +26 -0
  652. package/dist/esm/sdk/actions.d.ts.map +1 -0
  653. package/dist/esm/sdk/actions.js +38 -0
  654. package/dist/esm/sdk/actions.js.map +1 -0
  655. package/dist/esm/sdk/census.d.ts +58 -0
  656. package/dist/esm/sdk/census.d.ts.map +1 -0
  657. package/dist/esm/sdk/census.js +85 -0
  658. package/dist/esm/sdk/census.js.map +1 -0
  659. package/dist/esm/sdk/index.d.ts +2 -0
  660. package/dist/esm/sdk/index.d.ts.map +1 -0
  661. package/dist/esm/sdk/index.js +5 -0
  662. package/dist/esm/sdk/index.js.map +1 -0
  663. package/dist/esm/sdk/sdk.d.ts +13 -0
  664. package/dist/esm/sdk/sdk.d.ts.map +1 -0
  665. package/dist/esm/sdk/sdk.js +22 -0
  666. package/dist/esm/sdk/sdk.js.map +1 -0
  667. package/dist/esm/sdk/verification.d.ts +12 -0
  668. package/dist/esm/sdk/verification.d.ts.map +1 -0
  669. package/dist/esm/sdk/verification.js +18 -0
  670. package/dist/esm/sdk/verification.js.map +1 -0
  671. package/dist/esm/types/async.d.ts +23 -0
  672. package/dist/esm/types/async.d.ts.map +1 -0
  673. package/dist/esm/types/async.js +28 -0
  674. package/dist/esm/types/async.js.map +1 -0
  675. package/dist/esm/types/blobs.d.ts +4 -0
  676. package/dist/esm/types/blobs.d.ts.map +1 -0
  677. package/dist/esm/types/blobs.js +25 -0
  678. package/dist/esm/types/blobs.js.map +1 -0
  679. package/dist/esm/types/const-date-time.d.ts +3 -0
  680. package/dist/esm/types/const-date-time.d.ts.map +1 -0
  681. package/dist/esm/types/const-date-time.js +10 -0
  682. package/dist/esm/types/const-date-time.js.map +1 -0
  683. package/dist/esm/types/default-to-zero-value.d.ts +12 -0
  684. package/dist/esm/types/default-to-zero-value.d.ts.map +1 -0
  685. package/dist/esm/types/default-to-zero-value.js +31 -0
  686. package/dist/esm/types/default-to-zero-value.js.map +1 -0
  687. package/dist/esm/types/enums.d.ts +9 -0
  688. package/dist/esm/types/enums.d.ts.map +1 -0
  689. package/dist/esm/types/enums.js +27 -0
  690. package/dist/esm/types/enums.js.map +1 -0
  691. package/dist/esm/types/fp.d.ts +31 -0
  692. package/dist/esm/types/fp.d.ts.map +1 -0
  693. package/dist/esm/types/fp.js +31 -0
  694. package/dist/esm/types/fp.js.map +1 -0
  695. package/dist/esm/types/index.d.ts +10 -0
  696. package/dist/esm/types/index.d.ts.map +1 -0
  697. package/dist/esm/types/index.js +10 -0
  698. package/dist/esm/types/index.js.map +1 -0
  699. package/dist/esm/types/operations.d.ts +27 -0
  700. package/dist/esm/types/operations.d.ts.map +1 -0
  701. package/dist/esm/types/operations.js +77 -0
  702. package/dist/esm/types/operations.js.map +1 -0
  703. package/dist/esm/types/primitives.d.ts +9 -0
  704. package/dist/esm/types/primitives.d.ts.map +1 -0
  705. package/dist/esm/types/primitives.js +105 -0
  706. package/dist/esm/types/primitives.js.map +1 -0
  707. package/dist/esm/types/rfcdate.d.ts +21 -0
  708. package/dist/esm/types/rfcdate.d.ts.map +1 -0
  709. package/dist/esm/types/rfcdate.js +43 -0
  710. package/dist/esm/types/rfcdate.js.map +1 -0
  711. package/dist/esm/types/smart-union.d.ts +7 -0
  712. package/dist/esm/types/smart-union.d.ts.map +1 -0
  713. package/dist/esm/types/smart-union.js +116 -0
  714. package/dist/esm/types/smart-union.js.map +1 -0
  715. package/dist/esm/types/streams.d.ts +2 -0
  716. package/dist/esm/types/streams.d.ts.map +1 -0
  717. package/dist/esm/types/streams.js +15 -0
  718. package/dist/esm/types/streams.js.map +1 -0
  719. package/dist/esm/types/unrecognized.d.ts +16 -0
  720. package/dist/esm/types/unrecognized.d.ts.map +1 -0
  721. package/dist/esm/types/unrecognized.js +31 -0
  722. package/dist/esm/types/unrecognized.js.map +1 -0
  723. package/examples/censusCreateSession.example.ts +26 -0
  724. package/jsr.json +27 -0
  725. package/package.json +124 -132
  726. package/src/core.ts +13 -0
  727. package/src/funcs/actions-cancel-action.ts +174 -0
  728. package/src/funcs/actions-check-action-status.ts +179 -0
  729. package/src/funcs/actions-propose-action.ts +174 -0
  730. package/src/funcs/census-create-session.ts +184 -0
  731. package/src/funcs/census-create-verification-link.ts +185 -0
  732. package/src/funcs/census-get-partner-config.ts +203 -0
  733. package/src/funcs/census-logout.ts +181 -0
  734. package/src/funcs/census-revoke-verification.ts +185 -0
  735. package/src/funcs/census-store-signal.ts +169 -0
  736. package/src/funcs/census-validate-signal.ts +169 -0
  737. package/src/funcs/census-verify-token.ts +198 -0
  738. package/src/funcs/verification-get-status.ts +203 -0
  739. package/src/hooks/hooks.ts +129 -0
  740. package/src/hooks/index.ts +6 -0
  741. package/src/hooks/types.ts +108 -0
  742. package/src/index.ts +8 -21
  743. package/src/lib/base64.ts +37 -0
  744. package/src/lib/config.ts +75 -0
  745. package/src/lib/encodings.ts +529 -0
  746. package/src/lib/files.ts +104 -0
  747. package/src/lib/http.ts +325 -0
  748. package/src/lib/logger.ts +9 -0
  749. package/src/lib/matchers.ts +353 -0
  750. package/src/lib/primitives.ts +166 -0
  751. package/src/lib/retries.ts +226 -0
  752. package/src/lib/schemas.ts +91 -0
  753. package/src/lib/sdks.ts +438 -0
  754. package/src/lib/security.ts +293 -0
  755. package/src/lib/url.ts +35 -0
  756. package/src/mcp-server/cli/start/command.ts +117 -0
  757. package/src/mcp-server/cli/start/impl.ts +144 -0
  758. package/src/mcp-server/cli.ts +13 -0
  759. package/src/mcp-server/console-logger.ts +71 -0
  760. package/src/mcp-server/extensions.ts +17 -0
  761. package/src/mcp-server/mcp-server.ts +26 -0
  762. package/src/mcp-server/prompts.ts +121 -0
  763. package/src/mcp-server/resources.ts +176 -0
  764. package/src/mcp-server/scopes.ts +9 -0
  765. package/src/mcp-server/server.ts +65 -0
  766. package/src/mcp-server/shared.ts +74 -0
  767. package/src/mcp-server/tools/actions-cancel-action.ts +37 -0
  768. package/src/mcp-server/tools/actions-check-action-status.ts +37 -0
  769. package/src/mcp-server/tools/actions-propose-action.ts +37 -0
  770. package/src/mcp-server/tools.ts +133 -0
  771. package/src/models/error-body.ts +138 -0
  772. package/src/models/error-response.ts +56 -0
  773. package/src/models/errors/bot-shield-default-error.ts +40 -0
  774. package/src/models/errors/bot-shield-error.ts +35 -0
  775. package/src/models/errors/error-response.ts +72 -0
  776. package/src/models/errors/http-client-errors.ts +62 -0
  777. package/src/models/errors/index.ts +11 -0
  778. package/src/models/errors/invalid-input-error.ts +82 -0
  779. package/src/models/errors/response-validation-error.ts +50 -0
  780. package/src/models/errors/sdk-validation-error.ts +109 -0
  781. package/src/models/index.ts +8 -0
  782. package/src/models/invalid-input-error.ts +63 -0
  783. package/src/models/operations/actions-cancel.ts +271 -0
  784. package/src/models/operations/actions-check-status.ts +308 -0
  785. package/src/models/operations/actions-propose.ts +439 -0
  786. package/src/models/operations/index.ts +16 -0
  787. package/src/models/operations/sdk-create-session.ts +388 -0
  788. package/src/models/operations/sdk-create-verification-link.ts +540 -0
  789. package/src/models/operations/sdk-get-partner-config.ts +349 -0
  790. package/src/models/operations/sdk-logout.ts +230 -0
  791. package/src/models/operations/sdk-revoke-verification.ts +299 -0
  792. package/src/models/operations/sdk-store-signal.ts +261 -0
  793. package/src/models/operations/sdk-validate-signal.ts +274 -0
  794. package/src/models/operations/sdk-verify-token.ts +347 -0
  795. package/src/models/operations/verification-get-status.ts +424 -0
  796. package/src/models/security.ts +56 -0
  797. package/src/sdk/actions.ts +63 -0
  798. package/src/sdk/census.ts +162 -0
  799. package/src/sdk/index.ts +5 -0
  800. package/src/sdk/sdk.ts +25 -0
  801. package/src/sdk/verification.ts +29 -0
  802. package/src/types/async.ts +69 -0
  803. package/src/types/blobs.ts +32 -0
  804. package/src/types/const-date-time.ts +15 -0
  805. package/src/types/default-to-zero-value.ts +33 -0
  806. package/src/types/enums.ts +45 -0
  807. package/src/types/fp.ts +50 -0
  808. package/src/types/index.ts +13 -0
  809. package/src/types/operations.ts +105 -0
  810. package/src/types/primitives.ts +122 -0
  811. package/src/types/rfcdate.ts +54 -0
  812. package/src/types/smart-union.ts +153 -0
  813. package/src/types/streams.ts +21 -0
  814. package/src/types/unrecognized.ts +35 -0
  815. package/CHANGELOG.md +0 -270
  816. package/LICENSE +0 -201
  817. package/api-promise.d.mts +0 -3
  818. package/api-promise.d.mts.map +0 -1
  819. package/api-promise.d.ts +0 -3
  820. package/api-promise.d.ts.map +0 -1
  821. package/api-promise.js +0 -6
  822. package/api-promise.js.map +0 -1
  823. package/api-promise.mjs +0 -3
  824. package/api-promise.mjs.map +0 -1
  825. package/client.d.mts +0 -218
  826. package/client.d.mts.map +0 -1
  827. package/client.d.ts +0 -218
  828. package/client.d.ts.map +0 -1
  829. package/client.js +0 -534
  830. package/client.js.map +0 -1
  831. package/client.mjs +0 -530
  832. package/client.mjs.map +0 -1
  833. package/core/api-promise.d.mts +0 -46
  834. package/core/api-promise.d.mts.map +0 -1
  835. package/core/api-promise.d.ts +0 -46
  836. package/core/api-promise.d.ts.map +0 -1
  837. package/core/api-promise.js +0 -74
  838. package/core/api-promise.js.map +0 -1
  839. package/core/api-promise.mjs +0 -70
  840. package/core/api-promise.mjs.map +0 -1
  841. package/core/error.d.mts +0 -46
  842. package/core/error.d.mts.map +0 -1
  843. package/core/error.d.ts +0 -46
  844. package/core/error.d.ts.map +0 -1
  845. package/core/error.js +0 -113
  846. package/core/error.js.map +0 -1
  847. package/core/error.mjs +0 -97
  848. package/core/error.mjs.map +0 -1
  849. package/core/resource.d.mts +0 -6
  850. package/core/resource.d.mts.map +0 -1
  851. package/core/resource.d.ts +0 -6
  852. package/core/resource.d.ts.map +0 -1
  853. package/core/resource.js +0 -11
  854. package/core/resource.js.map +0 -1
  855. package/core/resource.mjs +0 -7
  856. package/core/resource.mjs.map +0 -1
  857. package/core/uploads.d.mts +0 -3
  858. package/core/uploads.d.mts.map +0 -1
  859. package/core/uploads.d.ts +0 -3
  860. package/core/uploads.d.ts.map +0 -1
  861. package/core/uploads.js +0 -6
  862. package/core/uploads.js.map +0 -1
  863. package/core/uploads.mjs +0 -2
  864. package/core/uploads.mjs.map +0 -1
  865. package/error.d.mts +0 -3
  866. package/error.d.mts.map +0 -1
  867. package/error.d.ts +0 -3
  868. package/error.d.ts.map +0 -1
  869. package/error.js +0 -6
  870. package/error.js.map +0 -1
  871. package/error.mjs +0 -3
  872. package/error.mjs.map +0 -1
  873. package/index.d.mts +0 -6
  874. package/index.d.mts.map +0 -1
  875. package/index.d.ts +0 -6
  876. package/index.d.ts.map +0 -1
  877. package/index.js +0 -30
  878. package/index.js.map +0 -1
  879. package/index.mjs +0 -7
  880. package/index.mjs.map +0 -1
  881. package/internal/builtin-types.d.mts +0 -73
  882. package/internal/builtin-types.d.mts.map +0 -1
  883. package/internal/builtin-types.d.ts +0 -73
  884. package/internal/builtin-types.d.ts.map +0 -1
  885. package/internal/builtin-types.js +0 -4
  886. package/internal/builtin-types.js.map +0 -1
  887. package/internal/builtin-types.mjs +0 -3
  888. package/internal/builtin-types.mjs.map +0 -1
  889. package/internal/detect-platform.d.mts +0 -15
  890. package/internal/detect-platform.d.mts.map +0 -1
  891. package/internal/detect-platform.d.ts +0 -15
  892. package/internal/detect-platform.d.ts.map +0 -1
  893. package/internal/detect-platform.js +0 -162
  894. package/internal/detect-platform.js.map +0 -1
  895. package/internal/detect-platform.mjs +0 -157
  896. package/internal/detect-platform.mjs.map +0 -1
  897. package/internal/errors.d.mts +0 -3
  898. package/internal/errors.d.mts.map +0 -1
  899. package/internal/errors.d.ts +0 -3
  900. package/internal/errors.d.ts.map +0 -1
  901. package/internal/errors.js +0 -41
  902. package/internal/errors.js.map +0 -1
  903. package/internal/errors.mjs +0 -36
  904. package/internal/errors.mjs.map +0 -1
  905. package/internal/headers.d.mts +0 -20
  906. package/internal/headers.d.mts.map +0 -1
  907. package/internal/headers.d.ts +0 -20
  908. package/internal/headers.d.ts.map +0 -1
  909. package/internal/headers.js +0 -79
  910. package/internal/headers.js.map +0 -1
  911. package/internal/headers.mjs +0 -74
  912. package/internal/headers.mjs.map +0 -1
  913. package/internal/parse.d.mts +0 -12
  914. package/internal/parse.d.mts.map +0 -1
  915. package/internal/parse.d.ts +0 -12
  916. package/internal/parse.d.ts.map +0 -1
  917. package/internal/parse.js +0 -40
  918. package/internal/parse.js.map +0 -1
  919. package/internal/parse.mjs +0 -37
  920. package/internal/parse.mjs.map +0 -1
  921. package/internal/request-options.d.mts +0 -75
  922. package/internal/request-options.d.mts.map +0 -1
  923. package/internal/request-options.d.ts +0 -75
  924. package/internal/request-options.d.ts.map +0 -1
  925. package/internal/request-options.js +0 -14
  926. package/internal/request-options.js.map +0 -1
  927. package/internal/request-options.mjs +0 -10
  928. package/internal/request-options.mjs.map +0 -1
  929. package/internal/shim-types.d.mts +0 -17
  930. package/internal/shim-types.d.mts.map +0 -1
  931. package/internal/shim-types.d.ts +0 -17
  932. package/internal/shim-types.d.ts.map +0 -1
  933. package/internal/shim-types.js +0 -4
  934. package/internal/shim-types.js.map +0 -1
  935. package/internal/shim-types.mjs +0 -3
  936. package/internal/shim-types.mjs.map +0 -1
  937. package/internal/shims.d.mts +0 -26
  938. package/internal/shims.d.mts.map +0 -1
  939. package/internal/shims.d.ts +0 -26
  940. package/internal/shims.d.ts.map +0 -1
  941. package/internal/shims.js +0 -92
  942. package/internal/shims.js.map +0 -1
  943. package/internal/shims.mjs +0 -85
  944. package/internal/shims.mjs.map +0 -1
  945. package/internal/to-file.d.mts +0 -45
  946. package/internal/to-file.d.mts.map +0 -1
  947. package/internal/to-file.d.ts +0 -45
  948. package/internal/to-file.d.ts.map +0 -1
  949. package/internal/to-file.js +0 -91
  950. package/internal/to-file.js.map +0 -1
  951. package/internal/to-file.mjs +0 -88
  952. package/internal/to-file.mjs.map +0 -1
  953. package/internal/tslib.js +0 -81
  954. package/internal/tslib.mjs +0 -17
  955. package/internal/types.d.mts +0 -69
  956. package/internal/types.d.mts.map +0 -1
  957. package/internal/types.d.ts +0 -69
  958. package/internal/types.d.ts.map +0 -1
  959. package/internal/types.js +0 -4
  960. package/internal/types.js.map +0 -1
  961. package/internal/types.mjs +0 -3
  962. package/internal/types.mjs.map +0 -1
  963. package/internal/uploads.d.mts +0 -42
  964. package/internal/uploads.d.mts.map +0 -1
  965. package/internal/uploads.d.ts +0 -42
  966. package/internal/uploads.d.ts.map +0 -1
  967. package/internal/uploads.js +0 -141
  968. package/internal/uploads.js.map +0 -1
  969. package/internal/uploads.mjs +0 -131
  970. package/internal/uploads.mjs.map +0 -1
  971. package/internal/utils/base64.d.mts +0 -3
  972. package/internal/utils/base64.d.mts.map +0 -1
  973. package/internal/utils/base64.d.ts +0 -3
  974. package/internal/utils/base64.d.ts.map +0 -1
  975. package/internal/utils/base64.js +0 -38
  976. package/internal/utils/base64.js.map +0 -1
  977. package/internal/utils/base64.mjs +0 -33
  978. package/internal/utils/base64.mjs.map +0 -1
  979. package/internal/utils/bytes.d.mts +0 -4
  980. package/internal/utils/bytes.d.mts.map +0 -1
  981. package/internal/utils/bytes.d.ts +0 -4
  982. package/internal/utils/bytes.d.ts.map +0 -1
  983. package/internal/utils/bytes.js +0 -31
  984. package/internal/utils/bytes.js.map +0 -1
  985. package/internal/utils/bytes.mjs +0 -26
  986. package/internal/utils/bytes.mjs.map +0 -1
  987. package/internal/utils/env.d.mts +0 -9
  988. package/internal/utils/env.d.mts.map +0 -1
  989. package/internal/utils/env.d.ts +0 -9
  990. package/internal/utils/env.d.ts.map +0 -1
  991. package/internal/utils/env.js +0 -22
  992. package/internal/utils/env.js.map +0 -1
  993. package/internal/utils/env.mjs +0 -18
  994. package/internal/utils/env.mjs.map +0 -1
  995. package/internal/utils/log.d.mts +0 -37
  996. package/internal/utils/log.d.mts.map +0 -1
  997. package/internal/utils/log.d.ts +0 -37
  998. package/internal/utils/log.d.ts.map +0 -1
  999. package/internal/utils/log.js +0 -87
  1000. package/internal/utils/log.js.map +0 -1
  1001. package/internal/utils/log.mjs +0 -81
  1002. package/internal/utils/log.mjs.map +0 -1
  1003. package/internal/utils/path.d.mts +0 -15
  1004. package/internal/utils/path.d.mts.map +0 -1
  1005. package/internal/utils/path.d.ts +0 -15
  1006. package/internal/utils/path.d.ts.map +0 -1
  1007. package/internal/utils/path.js +0 -79
  1008. package/internal/utils/path.js.map +0 -1
  1009. package/internal/utils/path.mjs +0 -74
  1010. package/internal/utils/path.mjs.map +0 -1
  1011. package/internal/utils/query.d.mts +0 -5
  1012. package/internal/utils/query.d.mts.map +0 -1
  1013. package/internal/utils/query.d.ts +0 -5
  1014. package/internal/utils/query.d.ts.map +0 -1
  1015. package/internal/utils/query.js +0 -23
  1016. package/internal/utils/query.js.map +0 -1
  1017. package/internal/utils/query.mjs +0 -20
  1018. package/internal/utils/query.mjs.map +0 -1
  1019. package/internal/utils/sleep.d.mts +0 -2
  1020. package/internal/utils/sleep.d.mts.map +0 -1
  1021. package/internal/utils/sleep.d.ts +0 -2
  1022. package/internal/utils/sleep.d.ts.map +0 -1
  1023. package/internal/utils/sleep.js +0 -7
  1024. package/internal/utils/sleep.js.map +0 -1
  1025. package/internal/utils/sleep.mjs +0 -3
  1026. package/internal/utils/sleep.mjs.map +0 -1
  1027. package/internal/utils/uuid.d.mts +0 -5
  1028. package/internal/utils/uuid.d.mts.map +0 -1
  1029. package/internal/utils/uuid.d.ts +0 -5
  1030. package/internal/utils/uuid.d.ts.map +0 -1
  1031. package/internal/utils/uuid.js +0 -19
  1032. package/internal/utils/uuid.js.map +0 -1
  1033. package/internal/utils/uuid.mjs +0 -15
  1034. package/internal/utils/uuid.mjs.map +0 -1
  1035. package/internal/utils/values.d.mts +0 -18
  1036. package/internal/utils/values.d.mts.map +0 -1
  1037. package/internal/utils/values.d.ts +0 -18
  1038. package/internal/utils/values.d.ts.map +0 -1
  1039. package/internal/utils/values.js +0 -112
  1040. package/internal/utils/values.js.map +0 -1
  1041. package/internal/utils/values.mjs +0 -94
  1042. package/internal/utils/values.mjs.map +0 -1
  1043. package/internal/utils.d.mts +0 -8
  1044. package/internal/utils.d.mts.map +0 -1
  1045. package/internal/utils.d.ts +0 -8
  1046. package/internal/utils.d.ts.map +0 -1
  1047. package/internal/utils.js +0 -12
  1048. package/internal/utils.js.map +0 -1
  1049. package/internal/utils.mjs +0 -9
  1050. package/internal/utils.mjs.map +0 -1
  1051. package/resource.d.mts +0 -3
  1052. package/resource.d.mts.map +0 -1
  1053. package/resource.d.ts +0 -3
  1054. package/resource.d.ts.map +0 -1
  1055. package/resource.js +0 -6
  1056. package/resource.js.map +0 -1
  1057. package/resource.mjs +0 -3
  1058. package/resource.mjs.map +0 -1
  1059. package/resources/actions.d.mts +0 -133
  1060. package/resources/actions.d.mts.map +0 -1
  1061. package/resources/actions.d.ts +0 -133
  1062. package/resources/actions.d.ts.map +0 -1
  1063. package/resources/actions.js +0 -36
  1064. package/resources/actions.js.map +0 -1
  1065. package/resources/actions.mjs +0 -32
  1066. package/resources/actions.mjs.map +0 -1
  1067. package/resources/index.d.mts +0 -4
  1068. package/resources/index.d.mts.map +0 -1
  1069. package/resources/index.d.ts +0 -4
  1070. package/resources/index.d.ts.map +0 -1
  1071. package/resources/index.js +0 -11
  1072. package/resources/index.js.map +0 -1
  1073. package/resources/index.mjs +0 -5
  1074. package/resources/index.mjs.map +0 -1
  1075. package/resources/sdk.d.mts +0 -261
  1076. package/resources/sdk.d.mts.map +0 -1
  1077. package/resources/sdk.d.ts +0 -261
  1078. package/resources/sdk.d.ts.map +0 -1
  1079. package/resources/sdk.js +0 -69
  1080. package/resources/sdk.js.map +0 -1
  1081. package/resources/sdk.mjs +0 -65
  1082. package/resources/sdk.mjs.map +0 -1
  1083. package/resources/verification.d.mts +0 -64
  1084. package/resources/verification.d.mts.map +0 -1
  1085. package/resources/verification.d.ts +0 -64
  1086. package/resources/verification.d.ts.map +0 -1
  1087. package/resources/verification.js +0 -25
  1088. package/resources/verification.js.map +0 -1
  1089. package/resources/verification.mjs +0 -21
  1090. package/resources/verification.mjs.map +0 -1
  1091. package/resources.d.mts +0 -2
  1092. package/resources.d.mts.map +0 -1
  1093. package/resources.d.ts +0 -2
  1094. package/resources.d.ts.map +0 -1
  1095. package/resources.js +0 -5
  1096. package/resources.js.map +0 -1
  1097. package/resources.mjs +0 -2
  1098. package/resources.mjs.map +0 -1
  1099. package/src/api-promise.ts +0 -2
  1100. package/src/client.ts +0 -892
  1101. package/src/core/README.md +0 -3
  1102. package/src/core/api-promise.ts +0 -92
  1103. package/src/core/error.ts +0 -130
  1104. package/src/core/resource.ts +0 -11
  1105. package/src/core/uploads.ts +0 -2
  1106. package/src/error.ts +0 -2
  1107. package/src/internal/README.md +0 -3
  1108. package/src/internal/builtin-types.ts +0 -93
  1109. package/src/internal/detect-platform.ts +0 -196
  1110. package/src/internal/errors.ts +0 -33
  1111. package/src/internal/headers.ts +0 -97
  1112. package/src/internal/parse.ts +0 -56
  1113. package/src/internal/request-options.ts +0 -91
  1114. package/src/internal/shim-types.ts +0 -26
  1115. package/src/internal/shims.ts +0 -107
  1116. package/src/internal/to-file.ts +0 -154
  1117. package/src/internal/types.ts +0 -93
  1118. package/src/internal/uploads.ts +0 -187
  1119. package/src/internal/utils/base64.ts +0 -40
  1120. package/src/internal/utils/bytes.ts +0 -32
  1121. package/src/internal/utils/env.ts +0 -18
  1122. package/src/internal/utils/log.ts +0 -128
  1123. package/src/internal/utils/path.ts +0 -88
  1124. package/src/internal/utils/query.ts +0 -23
  1125. package/src/internal/utils/sleep.ts +0 -3
  1126. package/src/internal/utils/uuid.ts +0 -17
  1127. package/src/internal/utils/values.ts +0 -105
  1128. package/src/internal/utils.ts +0 -9
  1129. package/src/lib/.keep +0 -4
  1130. package/src/resource.ts +0 -2
  1131. package/src/resources/actions.ts +0 -184
  1132. package/src/resources/index.ts +0 -37
  1133. package/src/resources/sdk.ts +0 -403
  1134. package/src/resources/verification.ts +0 -107
  1135. package/src/resources.ts +0 -1
  1136. package/src/tsconfig.json +0 -11
  1137. package/src/uploads.ts +0 -2
  1138. package/src/version.ts +0 -1
  1139. package/uploads.d.mts +0 -3
  1140. package/uploads.d.mts.map +0 -1
  1141. package/uploads.d.ts +0 -3
  1142. package/uploads.d.ts.map +0 -1
  1143. package/uploads.js +0 -6
  1144. package/uploads.js.map +0 -1
  1145. package/uploads.mjs +0 -3
  1146. package/uploads.mjs.map +0 -1
  1147. package/version.d.mts +0 -2
  1148. package/version.d.mts.map +0 -1
  1149. package/version.d.ts +0 -2
  1150. package/version.d.ts.map +0 -1
  1151. package/version.js +0 -5
  1152. package/version.js.map +0 -1
  1153. package/version.mjs +0 -2
  1154. package/version.mjs.map +0 -1
package/README.md CHANGED
@@ -1,410 +1,600 @@
1
- # Bot Shield TypeScript API Library
1
+ # botshield-sdk
2
2
 
3
- [![NPM version](<https://img.shields.io/npm/v/botshield-sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/botshield-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/botshield-sdk)
3
+ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *botshield-sdk* API.
4
4
 
5
- This library provides convenient access to the Bot Shield REST API from server-side TypeScript or JavaScript.
5
+ [![Built by Speakeasy](https://img.shields.io/badge/Built_by-SPEAKEASY-374151?style=for-the-badge&labelColor=f3f4f6)](https://www.speakeasy.com/?utm_source=botshield-sdk&utm_campaign=typescript)
6
+ [![License: MIT](https://img.shields.io/badge/LICENSE_//_MIT-3b5bdb?style=for-the-badge&labelColor=eff6ff)](https://opensource.org/licenses/MIT)
6
7
 
7
- The REST API documentation can be found on [docs.botshield.ai](https://docs.botshield.ai). The full API of this library can be found in [api.md](api.md).
8
8
 
9
- It is generated with [Stainless](https://www.stainless.com/).
9
+ <br /><br />
10
+ > [!IMPORTANT]
10
11
 
11
- ## MCP Server
12
+ <!-- Start Summary [summary] -->
13
+ ## Summary
12
14
 
13
- Use the Bot Shield MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
15
+ BotShield API: Human presence verification protocol.
14
16
 
15
- [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=botshield-sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImJvdHNoaWVsZC1zZGstbWNwIl0sImVudiI6eyJCT1RTSElFTERfQVBJX0tFWSI6Ik15IEFQSSBLZXkiLCJCT1RTSElFTERfQUdFTlRfS0VZIjoiTXkgQWdlbnQgS2V5In19)
16
- [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22botshield-sdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22botshield-sdk-mcp%22%5D%2C%22env%22%3A%7B%22BOTSHIELD_API_KEY%22%3A%22My%20API%20Key%22%2C%22BOTSHIELD_AGENT_KEY%22%3A%22My%20Agent%20Key%22%7D%7D)
17
+ **Census** — a partner gate (checkout, sign-up, any action moment) asks whether a live human is present. The client pre-check returns the two-result-state contract `result_state: human_verified | unavailable`; when presence is required the person confirms with a device biometric in the BotShield app and the gate receives an ES256 attestation JWT, verifiable against the public JWKS at /.well-known/jwks.json. No identity crosses the boundary.
17
18
 
18
- > Note: You may need to set environment variables in your MCP client.
19
+ **Agents Ask** — an agent proposes an action; the human confirms in the BotShield app and BotShield signs a Proof of Resolution JWT.
19
20
 
20
- ## Installation
21
+ **Frontend:** load the BotShield client script from https://cdn.botshield.ai/sdk.js and place the botshield-verify element.
21
22
 
22
- ```sh
23
- npm install botshield-sdk
24
- ```
23
+ **Backend SDK:** install `botshield-sdk` from npm and use `client.sdk.*`, `client.verification.*`, `client.actions.*`.
25
24
 
26
- ## Usage
25
+ **Response envelope:** every operation answers HTTP 200 with `{ data: ... }`. Most carry the result one level deeper (`data.data`); `logout` and `verification/status` carry it directly. Handler errors are also HTTP 200 — `data.error = { message, statusCode }` — so check `data.error` before reading a result. HTTP 400 is reserved for input validation (`InvalidInputError`), 500 for unhandled failures.
26
+ <!-- End Summary [summary] -->
27
27
 
28
- The full API of this library can be found in [api.md](api.md).
28
+ <!-- Start Table of Contents [toc] -->
29
+ ## Table of Contents
30
+ <!-- $toc-max-depth=2 -->
31
+ * [botshield-sdk](#botshield-sdk)
32
+ * [SDK Installation](#sdk-installation)
33
+ * [Requirements](#requirements)
34
+ * [SDK Example Usage](#sdk-example-usage)
35
+ * [Authentication](#authentication)
36
+ * [Available Resources and Operations](#available-resources-and-operations)
37
+ * [Standalone functions](#standalone-functions)
38
+ * [Retries](#retries)
39
+ * [Error Handling](#error-handling)
40
+ * [Server Selection](#server-selection)
41
+ * [Custom HTTP Client](#custom-http-client)
42
+ * [Debugging](#debugging)
43
+ * [Development](#development)
44
+ * [Maturity](#maturity)
45
+ * [Contributions](#contributions)
29
46
 
30
- <!-- prettier-ignore -->
31
- ```js
32
- import BotShield from 'botshield-sdk';
47
+ <!-- End Table of Contents [toc] -->
33
48
 
34
- const client = new BotShield({
35
- apiKey: process.env['BOTSHIELD_API_KEY'], // This is the default and can be omitted
36
- environment: 'development', // defaults to 'production'
37
- });
49
+ <!-- Start SDK Installation [installation] -->
50
+ ## SDK Installation
38
51
 
39
- const response = await client.sdk.createVerificationLink({
40
- return_url: 'https://yourapp.com/verified',
41
- user_email: 'user@example.com',
42
- });
52
+ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
43
53
 
44
- console.log(response.data);
45
- ```
54
+ ### NPM
46
55
 
47
- ### Request & Response types
56
+ ```bash
57
+ npm add botshield-sdk
58
+ ```
48
59
 
49
- This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
60
+ ### PNPM
50
61
 
51
- <!-- prettier-ignore -->
52
- ```ts
53
- import BotShield from 'botshield-sdk';
62
+ ```bash
63
+ pnpm add botshield-sdk
64
+ ```
54
65
 
55
- const client = new BotShield({
56
- apiKey: process.env['BOTSHIELD_API_KEY'], // This is the default and can be omitted
57
- environment: 'development', // defaults to 'production'
58
- });
66
+ ### Bun
59
67
 
60
- const params: BotShield.SDKCreateVerificationLinkParams = {
61
- metadata: { cart_id: 'cart_123', action: 'checkout' },
62
- mode: 'linked-account',
63
- return_url: 'https://yourapp.com/verified',
64
- user_email: 'user@example.com',
65
- };
66
- const response: BotShield.SDKCreateVerificationLinkResponse =
67
- await client.sdk.createVerificationLink(params);
68
+ ```bash
69
+ bun add botshield-sdk
68
70
  ```
69
71
 
70
- Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
71
-
72
- ## Handling errors
73
-
74
- When the library is unable to connect to the API,
75
- or if the API returns a non-success status code (i.e., 4xx or 5xx response),
76
- a subclass of `APIError` will be thrown:
77
-
78
- <!-- prettier-ignore -->
79
- ```ts
80
- const response = await client.sdk
81
- .createVerificationLink({
82
- metadata: { cart_id: 'cart_123', action: 'checkout' },
83
- mode: 'linked-account',
84
- return_url: 'https://yourapp.com/verified',
85
- user_email: 'user@example.com',
86
- })
87
- .catch(async (err) => {
88
- if (err instanceof BotShield.APIError) {
89
- console.log(err.status); // 400
90
- console.log(err.name); // BadRequestError
91
- console.log(err.headers); // {server: 'nginx', ...}
92
- } else {
93
- throw err;
94
- }
95
- });
72
+ ### Yarn
73
+
74
+ ```bash
75
+ yarn add botshield-sdk
96
76
  ```
97
77
 
98
- Error codes are as follows:
78
+ > [!NOTE]
79
+ > This package is published with CommonJS and ES Modules (ESM) support.
99
80
 
100
- | Status Code | Error Type |
101
- | ----------- | -------------------------- |
102
- | 400 | `BadRequestError` |
103
- | 401 | `AuthenticationError` |
104
- | 403 | `PermissionDeniedError` |
105
- | 404 | `NotFoundError` |
106
- | 422 | `UnprocessableEntityError` |
107
- | 429 | `RateLimitError` |
108
- | >=500 | `InternalServerError` |
109
- | N/A | `APIConnectionError` |
110
81
 
111
- ### Retries
82
+ ### Model Context Protocol (MCP) Server
112
83
 
113
- Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
114
- Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
115
- 429 Rate Limit, and >=500 Internal errors will all be retried by default.
84
+ This SDK is also an installable MCP server where the various SDK methods are
85
+ exposed as tools that can be invoked by AI applications.
116
86
 
117
- You can use the `maxRetries` option to configure or disable this:
87
+ > Node.js v20 or greater is required to run the MCP server from npm.
118
88
 
119
- <!-- prettier-ignore -->
120
- ```js
121
- // Configure the default for all requests:
122
- const client = new BotShield({
123
- maxRetries: 0, // default is 2
124
- });
89
+ <details>
90
+ <summary>Claude installation steps</summary>
125
91
 
126
- // Or, configure per-request:
127
- await client.sdk.createVerificationLink({
128
- metadata: { cart_id: 'cart_123', action: 'checkout' },
129
- mode: 'linked-account',
130
- return_url: 'https://yourapp.com/verified',
131
- user_email: 'user@example.com',
132
- }, {
133
- maxRetries: 5,
134
- });
92
+ Add the following server definition to your `claude_desktop_config.json` file:
93
+
94
+ ```json
95
+ {
96
+ "mcpServers": {
97
+ "BotShield": {
98
+ "command": "npx",
99
+ "args": [
100
+ "-y", "--package", "botshield-sdk",
101
+ "--",
102
+ "mcp", "start",
103
+ "--agent-key-auth", "...",
104
+ "--agent-key-auth1", "...",
105
+ "--agent-key-auth2", "..."
106
+ ]
107
+ }
108
+ }
109
+ }
135
110
  ```
136
111
 
137
- ### Timeouts
112
+ </details>
113
+
114
+ <details>
115
+ <summary>Cursor installation steps</summary>
116
+
117
+ Create a `.cursor/mcp.json` file in your project root with the following content:
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "BotShield": {
123
+ "command": "npx",
124
+ "args": [
125
+ "-y", "--package", "botshield-sdk",
126
+ "--",
127
+ "mcp", "start",
128
+ "--agent-key-auth", "...",
129
+ "--agent-key-auth1", "...",
130
+ "--agent-key-auth2", "..."
131
+ ]
132
+ }
133
+ }
134
+ }
135
+ ```
138
136
 
139
- Requests time out after 1 minute by default. You can configure this with a `timeout` option:
137
+ </details>
140
138
 
141
- <!-- prettier-ignore -->
142
- ```ts
143
- // Configure the default for all requests:
144
- const client = new BotShield({
145
- timeout: 20 * 1000, // 20 seconds (default is 1 minute)
146
- });
139
+ You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:
147
140
 
148
- // Override per-request:
149
- await client.sdk.createVerificationLink({
150
- metadata: { cart_id: 'cart_123', action: 'checkout' },
151
- mode: 'linked-account',
152
- return_url: 'https://yourapp.com/verified',
153
- user_email: 'user@example.com',
154
- }, {
155
- timeout: 5 * 1000,
156
- });
141
+ ```bash
142
+ curl -L -o mcp-server \
143
+ https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \
144
+ chmod +x mcp-server
145
+ ```
146
+
147
+ If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`.
148
+
149
+
150
+ ```json
151
+ {
152
+ "mcpServers": {
153
+ "Todos": {
154
+ "command": "./DOWNLOAD/PATH/mcp-server",
155
+ "args": [
156
+ "start"
157
+ ]
158
+ }
159
+ }
160
+ }
157
161
  ```
158
162
 
159
- On timeout, an `APIConnectionTimeoutError` is thrown.
160
-
161
- Note that requests which time out will be [retried twice by default](#retries).
162
-
163
- ## Advanced Usage
164
-
165
- ### Accessing raw Response data (e.g., headers)
166
-
167
- The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
168
- This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
169
-
170
- You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
171
- Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
172
-
173
- <!-- prettier-ignore -->
174
- ```ts
175
- const client = new BotShield();
176
-
177
- const response = await client.sdk
178
- .createVerificationLink({
179
- metadata: { cart_id: 'cart_123', action: 'checkout' },
180
- mode: 'linked-account',
181
- return_url: 'https://yourapp.com/verified',
182
- user_email: 'user@example.com',
183
- })
184
- .asResponse();
185
- console.log(response.headers.get('X-My-Header'));
186
- console.log(response.statusText); // access the underlying Response object
187
-
188
- const { data: response, response: raw } = await client.sdk
189
- .createVerificationLink({
190
- metadata: { cart_id: 'cart_123', action: 'checkout' },
191
- mode: 'linked-account',
192
- return_url: 'https://yourapp.com/verified',
193
- user_email: 'user@example.com',
194
- })
195
- .withResponse();
196
- console.log(raw.headers.get('X-My-Header'));
197
- console.log(response.data);
163
+ For a full list of server arguments, run:
164
+
165
+ ```sh
166
+ npx -y --package botshield-sdk -- mcp start --help
198
167
  ```
168
+ <!-- End SDK Installation [installation] -->
199
169
 
200
- ### Logging
170
+ <!-- Start Requirements [requirements] -->
171
+ ## Requirements
201
172
 
202
- > [!IMPORTANT]
203
- > All log messages are intended for debugging only. The format and content of log messages
204
- > may change between releases.
173
+ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
174
+ <!-- End Requirements [requirements] -->
205
175
 
206
- #### Log levels
176
+ <!-- Start SDK Example Usage [usage] -->
177
+ ## SDK Example Usage
207
178
 
208
- The log level can be configured in two ways:
179
+ ### Example
209
180
 
210
- 1. Via the `BOT_SHIELD_LOG` environment variable
211
- 2. Using the `logLevel` client option (overrides the environment variable if set)
181
+ ```typescript
182
+ import { BotShield } from "botshield-sdk";
212
183
 
213
- ```ts
214
- import BotShield from 'botshield-sdk';
184
+ const botShield = new BotShield();
215
185
 
216
- const client = new BotShield({
217
- logLevel: 'debug', // Show all log messages
218
- });
219
- ```
186
+ async function run() {
187
+ const result = await botShield.census.createSession({
188
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
189
+ }, {});
220
190
 
221
- Available log levels, from most to least verbose:
191
+ console.log(result);
192
+ }
222
193
 
223
- - `'debug'` - Show debug messages, info, warnings, and errors
224
- - `'info'` - Show info messages, warnings, and errors
225
- - `'warn'` - Show warnings and errors (default)
226
- - `'error'` - Show only errors
227
- - `'off'` - Disable all logging
194
+ run();
228
195
 
229
- At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
230
- Some authentication-related headers are redacted, but sensitive data in request and response bodies
231
- may still be visible.
196
+ ```
197
+ <!-- End SDK Example Usage [usage] -->
232
198
 
233
- #### Custom logger
199
+ <!-- Start Authentication [security] -->
200
+ ## Authentication
234
201
 
235
- By default, this library logs to `globalThis.console`. You can also provide a custom logger.
236
- Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
202
+ ### Per-Client Security Schemes
237
203
 
238
- When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
239
- below the configured level will not be sent to your logger.
204
+ This SDK supports the following security schemes globally:
240
205
 
241
- ```ts
242
- import BotShield from 'botshield-sdk';
243
- import pino from 'pino';
206
+ | Name | Type | Scheme |
207
+ | --------------- | ------ | ------- |
208
+ | `agentKeyAuth` | apiKey | API key |
209
+ | `agentKeyAuth1` | apiKey | API key |
210
+ | `agentKeyAuth2` | apiKey | API key |
244
211
 
245
- const logger = pino();
212
+ You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
213
+ ```typescript
214
+ import { BotShield } from "botshield-sdk";
246
215
 
247
- const client = new BotShield({
248
- logger: logger.child({ name: 'BotShield' }),
249
- logLevel: 'debug', // Send all messages to pino, allowing it to filter
216
+ const botShield = new BotShield({
217
+ security: {
218
+ agentKeyAuth: "<YOUR_API_KEY_HERE>",
219
+ },
250
220
  });
221
+
222
+ async function run() {
223
+ const result = await botShield.census.storeSignal({
224
+ siteKey: "<value>",
225
+ score: 229498,
226
+ });
227
+
228
+ console.log(result);
229
+ }
230
+
231
+ run();
232
+
251
233
  ```
252
234
 
253
- ### Making custom/undocumented requests
235
+ ### Per-Operation Security Schemes
254
236
 
255
- This library is typed for convenient access to the documented API. If you need to access undocumented
256
- endpoints, params, or response properties, the library can still be used.
237
+ Some operations in this SDK require the security scheme to be specified at the request level. For example:
238
+ ```typescript
239
+ import { BotShield } from "botshield-sdk";
257
240
 
258
- #### Undocumented endpoints
241
+ const botShield = new BotShield();
259
242
 
260
- To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
261
- Options on the client, such as retries, will be respected when making these requests.
243
+ async function run() {
244
+ const result = await botShield.census.createSession({
245
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
246
+ }, {});
247
+
248
+ console.log(result);
249
+ }
250
+
251
+ run();
262
252
 
263
- ```ts
264
- await client.post('/some/path', {
265
- body: { some_prop: 'foo' },
266
- query: { some_query_arg: 'bar' },
267
- });
268
253
  ```
254
+ <!-- End Authentication [security] -->
269
255
 
270
- #### Undocumented request params
256
+ <!-- Start Available Resources and Operations [operations] -->
257
+ ## Available Resources and Operations
271
258
 
272
- To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
273
- parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
274
- send will be sent as-is.
259
+ <details open>
260
+ <summary>Available methods</summary>
275
261
 
276
- ```ts
277
- client.sdk.createVerificationLink({
278
- // ...
279
- // @ts-expect-error baz is not yet public
280
- baz: 'undocumented option',
281
- });
282
- ```
262
+ ### [Actions](docs/sdks/actions/README.md)
283
263
 
284
- For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
285
- extra param in the body.
264
+ * [proposeAction](docs/sdks/actions/README.md#proposeaction) - Propose an action for human confirmation
265
+ * [checkActionStatus](docs/sdks/actions/README.md#checkactionstatus) - Check action proposal status
266
+ * [cancelAction](docs/sdks/actions/README.md#cancelaction) - Cancel a queued action proposal
286
267
 
287
- If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
288
- options.
268
+ ### [Census](docs/sdks/census/README.md)
289
269
 
290
- #### Undocumented response properties
270
+ * [createSession](docs/sdks/census/README.md#createsession) - Create an Anchor Grant Window
271
+ * [createVerificationLink](docs/sdks/census/README.md#createverificationlink) - Create a verification request
272
+ * [verifyToken](docs/sdks/census/README.md#verifytoken) - Validate a verification token
273
+ * [storeSignal](docs/sdks/census/README.md#storesignal) - Store a Signal Pixel bot score
274
+ * [validateSignal](docs/sdks/census/README.md#validatesignal) - Validate a signal token
275
+ * [getPartnerConfig](docs/sdks/census/README.md#getpartnerconfig) - Get partner configuration
276
+ * [revokeVerification](docs/sdks/census/README.md#revokeverification) - Revoke a pending verification
277
+ * [logout](docs/sdks/census/README.md#logout) - Revoke an Anchor Grant Window token
291
278
 
292
- To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
293
- the response object, or cast the response object to the requisite type. Like the request params, we do not
294
- validate or strip extra properties from the response from the API.
279
+ ### [Verification](docs/sdks/verification/README.md)
295
280
 
296
- ### Customizing the fetch client
281
+ * [getStatus](docs/sdks/verification/README.md#getstatus) - Check verification status
297
282
 
298
- By default, this library expects a global `fetch` function is defined.
283
+ </details>
284
+ <!-- End Available Resources and Operations [operations] -->
299
285
 
300
- If you want to use a different `fetch` function, you can either polyfill the global:
286
+ <!-- Start Standalone functions [standalone-funcs] -->
287
+ ## Standalone functions
301
288
 
302
- ```ts
303
- import fetch from 'my-fetch';
289
+ All the methods listed above are available as standalone functions. These
290
+ functions are ideal for use in applications running in the browser, serverless
291
+ runtimes or other environments where application bundle size is a primary
292
+ concern. When using a bundler to build your application, all unused
293
+ functionality will be either excluded from the final bundle or tree-shaken away.
304
294
 
305
- globalThis.fetch = fetch;
306
- ```
295
+ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
307
296
 
308
- Or pass it to the client:
297
+ <details>
309
298
 
310
- ```ts
311
- import BotShield from 'botshield-sdk';
312
- import fetch from 'my-fetch';
299
+ <summary>Available standalone functions</summary>
313
300
 
314
- const client = new BotShield({ fetch });
315
- ```
301
+ - [`actionsCancelAction`](docs/sdks/actions/README.md#cancelaction) - Cancel a queued action proposal
302
+ - [`actionsCheckActionStatus`](docs/sdks/actions/README.md#checkactionstatus) - Check action proposal status
303
+ - [`actionsProposeAction`](docs/sdks/actions/README.md#proposeaction) - Propose an action for human confirmation
304
+ - [`censusCreateSession`](docs/sdks/census/README.md#createsession) - Create an Anchor Grant Window
305
+ - [`censusCreateVerificationLink`](docs/sdks/census/README.md#createverificationlink) - Create a verification request
306
+ - [`censusGetPartnerConfig`](docs/sdks/census/README.md#getpartnerconfig) - Get partner configuration
307
+ - [`censusLogout`](docs/sdks/census/README.md#logout) - Revoke an Anchor Grant Window token
308
+ - [`censusRevokeVerification`](docs/sdks/census/README.md#revokeverification) - Revoke a pending verification
309
+ - [`censusStoreSignal`](docs/sdks/census/README.md#storesignal) - Store a Signal Pixel bot score
310
+ - [`censusValidateSignal`](docs/sdks/census/README.md#validatesignal) - Validate a signal token
311
+ - [`censusVerifyToken`](docs/sdks/census/README.md#verifytoken) - Validate a verification token
312
+ - [`verificationGetStatus`](docs/sdks/verification/README.md#getstatus) - Check verification status
313
+
314
+ </details>
315
+ <!-- End Standalone functions [standalone-funcs] -->
316
+
317
+ <!-- Start Retries [retries] -->
318
+ ## Retries
319
+
320
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
321
+
322
+ To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
323
+ ```typescript
324
+ import { BotShield } from "botshield-sdk";
325
+
326
+ const botShield = new BotShield();
316
327
 
317
- ### Fetch options
328
+ async function run() {
329
+ const result = await botShield.census.createSession(
330
+ {
331
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
332
+ },
333
+ {},
334
+ {
335
+ retries: {
336
+ strategy: "backoff",
337
+ backoff: {
338
+ initialInterval: 1,
339
+ maxInterval: 50,
340
+ exponent: 1.1,
341
+ maxElapsedTime: 100,
342
+ },
343
+ retryConnectionErrors: false,
344
+ },
345
+ },
346
+ );
318
347
 
319
- If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
348
+ console.log(result);
349
+ }
320
350
 
321
- ```ts
322
- import BotShield from 'botshield-sdk';
351
+ run();
323
352
 
324
- const client = new BotShield({
325
- fetchOptions: {
326
- // `RequestInit` options
353
+ ```
354
+
355
+ If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
356
+ ```typescript
357
+ import { BotShield } from "botshield-sdk";
358
+
359
+ const botShield = new BotShield({
360
+ retryConfig: {
361
+ strategy: "backoff",
362
+ backoff: {
363
+ initialInterval: 1,
364
+ maxInterval: 50,
365
+ exponent: 1.1,
366
+ maxElapsedTime: 100,
367
+ },
368
+ retryConnectionErrors: false,
327
369
  },
328
370
  });
371
+
372
+ async function run() {
373
+ const result = await botShield.census.createSession({
374
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
375
+ }, {});
376
+
377
+ console.log(result);
378
+ }
379
+
380
+ run();
381
+
382
+ ```
383
+ <!-- End Retries [retries] -->
384
+
385
+ <!-- Start Error Handling [errors] -->
386
+ ## Error Handling
387
+
388
+ [`BotShieldError`](./src/models/errors/bot-shield-error.ts) is the base class for all HTTP error responses. It has the following properties:
389
+
390
+ | Property | Type | Description |
391
+ | ------------------- | ---------- | --------------------------------------------------------------------------------------- |
392
+ | `error.message` | `string` | Error message |
393
+ | `error.statusCode` | `number` | HTTP response status code eg `404` |
394
+ | `error.headers` | `Headers` | HTTP response headers |
395
+ | `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
396
+ | `error.rawResponse` | `Response` | Raw HTTP response |
397
+ | `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
398
+
399
+ ### Example
400
+ ```typescript
401
+ import { BotShield } from "botshield-sdk";
402
+ import * as errors from "botshield-sdk/models/errors";
403
+
404
+ const botShield = new BotShield();
405
+
406
+ async function run() {
407
+ try {
408
+ const result = await botShield.census.createSession({
409
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
410
+ }, {});
411
+
412
+ console.log(result);
413
+ } catch (error) {
414
+ // The base class for HTTP error responses
415
+ if (error instanceof errors.BotShieldError) {
416
+ console.log(error.message);
417
+ console.log(error.statusCode);
418
+ console.log(error.body);
419
+ console.log(error.headers);
420
+
421
+ // Depending on the method different errors may be thrown
422
+ if (error instanceof errors.InvalidInputError) {
423
+ console.log(error.data$.message); // string
424
+ console.log(error.data$.input); // { [k: string]: any }
425
+ console.log(error.data$.errors); // InvalidInputErrorError[]
426
+ }
427
+ }
428
+ }
429
+ }
430
+
431
+ run();
432
+
329
433
  ```
330
434
 
331
- #### Configuring proxies
435
+ ### Error Classes
436
+ **Primary errors:**
437
+ * [`BotShieldError`](./src/models/errors/bot-shield-error.ts): The base class for HTTP error responses.
438
+ * [`InvalidInputError`](./src/models/errors/invalid-input-error.ts): Invalid input. Status code `400`.
439
+ * [`ErrorResponse`](./src/models/errors/error-response.ts): Internal server error. Status code `500`.
332
440
 
333
- To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
334
- options to requests:
441
+ <details><summary>Less common errors (6)</summary>
335
442
 
336
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
443
+ <br />
337
444
 
338
- ```ts
339
- import BotShield from 'botshield-sdk';
340
- import * as undici from 'undici';
445
+ **Network errors:**
446
+ * [`ConnectionError`](./src/models/errors/http-client-errors.ts): HTTP client was unable to make a request to a server.
447
+ * [`RequestTimeoutError`](./src/models/errors/http-client-errors.ts): HTTP request timed out due to an AbortSignal signal.
448
+ * [`RequestAbortedError`](./src/models/errors/http-client-errors.ts): HTTP request was aborted by the client.
449
+ * [`InvalidRequestError`](./src/models/errors/http-client-errors.ts): Any input used to create a request is invalid.
450
+ * [`UnexpectedClientError`](./src/models/errors/http-client-errors.ts): Unrecognised or unexpected error.
341
451
 
342
- const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
343
- const client = new BotShield({
344
- fetchOptions: {
345
- dispatcher: proxyAgent,
346
- },
452
+
453
+ **Inherit from [`BotShieldError`](./src/models/errors/bot-shield-error.ts)**:
454
+ * [`ResponseValidationError`](./src/models/errors/response-validation-error.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
455
+
456
+ </details>
457
+ <!-- End Error Handling [errors] -->
458
+
459
+ <!-- Start Server Selection [server] -->
460
+ ## Server Selection
461
+
462
+ ### Select Server by Index
463
+
464
+ You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
465
+
466
+ | # | Server | Description |
467
+ | --- | ------------------------------------- | ----------------- |
468
+ | 0 | `http://localhost:9991/operations` | Local development |
469
+ | 1 | `https://api.botshield.ai/operations` | Production |
470
+
471
+ #### Example
472
+
473
+ ```typescript
474
+ import { BotShield } from "botshield-sdk";
475
+
476
+ const botShield = new BotShield({
477
+ serverIdx: 0,
347
478
  });
479
+
480
+ async function run() {
481
+ const result = await botShield.census.createSession({
482
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
483
+ }, {});
484
+
485
+ console.log(result);
486
+ }
487
+
488
+ run();
489
+
348
490
  ```
349
491
 
350
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
492
+ ### Override Server URL Per-Client
351
493
 
352
- ```ts
353
- import BotShield from 'botshield-sdk';
494
+ The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
495
+ ```typescript
496
+ import { BotShield } from "botshield-sdk";
354
497
 
355
- const client = new BotShield({
356
- fetchOptions: {
357
- proxy: 'http://localhost:8888',
358
- },
498
+ const botShield = new BotShield({
499
+ serverURL: "https://api.botshield.ai/operations",
359
500
  });
501
+
502
+ async function run() {
503
+ const result = await botShield.census.createSession({
504
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
505
+ }, {});
506
+
507
+ console.log(result);
508
+ }
509
+
510
+ run();
511
+
360
512
  ```
513
+ <!-- End Server Selection [server] -->
514
+
515
+ <!-- Start Custom HTTP Client [http-client] -->
516
+ ## Custom HTTP Client
517
+
518
+ The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
519
+ [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
520
+ client is a thin wrapper around `fetch` and provides the ability to attach hooks
521
+ around the request lifecycle that can be used to modify the request or handle
522
+ errors and response.
523
+
524
+ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
525
+ used to integrate a third-party HTTP client or when writing tests to mock out
526
+ the HTTP client and feed in fixtures.
527
+
528
+ The following example shows how to:
529
+ - route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent
530
+ - use the `"beforeRequest"` hook to add a custom header and a timeout to requests
531
+ - use the `"requestError"` hook to log errors
532
+
533
+ ```typescript
534
+ import { BotShield } from "botshield-sdk";
535
+ import { ProxyAgent } from "undici";
536
+ import { HTTPClient } from "botshield-sdk/lib/http";
537
+
538
+ const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
539
+
540
+ const httpClient = new HTTPClient({
541
+ // 'fetcher' takes a function that has the same signature as native 'fetch'.
542
+ fetcher: (input, init) =>
543
+ // 'dispatcher' is specific to undici and not part of the standard Fetch API.
544
+ fetch(input, { ...init, dispatcher } as RequestInit),
545
+ });
361
546
 
362
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
547
+ httpClient.addHook("beforeRequest", (request) => {
548
+ const nextRequest = new Request(request, {
549
+ signal: request.signal || AbortSignal.timeout(5000)
550
+ });
363
551
 
364
- ```ts
365
- import BotShield from 'npm:botshield-sdk';
552
+ nextRequest.headers.set("x-custom-header", "custom value");
366
553
 
367
- const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
368
- const client = new BotShield({
369
- fetchOptions: {
370
- client: httpClient,
371
- },
554
+ return nextRequest;
372
555
  });
373
- ```
374
556
 
375
- ## Frequently Asked Questions
557
+ httpClient.addHook("requestError", (error, request) => {
558
+ console.group("Request Error");
559
+ console.log("Reason:", `${error}`);
560
+ console.log("Endpoint:", `${request.method} ${request.url}`);
561
+ console.groupEnd();
562
+ });
376
563
 
377
- ## Semantic versioning
564
+ const sdk = new BotShield({ httpClient: httpClient });
565
+ ```
566
+ <!-- End Custom HTTP Client [http-client] -->
378
567
 
379
- This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
568
+ <!-- Start Debugging [debug] -->
569
+ ## Debugging
380
570
 
381
- 1. Changes that only affect static types, without breaking runtime behavior.
382
- 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
383
- 3. Changes that we do not expect to impact the vast majority of users in practice.
571
+ You can setup your SDK to emit debug logs for SDK requests and responses.
384
572
 
385
- We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
573
+ You can pass a logger that matches `console`'s interface as an SDK option.
386
574
 
387
- We are keen for your feedback; please open an [issue](https://www.github.com/Bot-Shield/botshield-sdk-typescript/issues) with questions, bugs, or suggestions.
575
+ > [!WARNING]
576
+ > Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
388
577
 
389
- ## Requirements
578
+ ```typescript
579
+ import { BotShield } from "botshield-sdk";
580
+
581
+ const sdk = new BotShield({ debugLogger: console });
582
+ ```
583
+ <!-- End Debugging [debug] -->
390
584
 
391
- TypeScript >= 4.9 is supported.
585
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
392
586
 
393
- The following runtimes are supported:
587
+ # Development
394
588
 
395
- - Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
396
- - Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
397
- - Deno v1.28.0 or higher.
398
- - Bun 1.0 or later.
399
- - Cloudflare Workers.
400
- - Vercel Edge Runtime.
401
- - Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
402
- - Nitro v2.6 or greater.
589
+ ## Maturity
403
590
 
404
- Note that React Native is not supported at this time.
591
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
592
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
593
+ looking for the latest version.
405
594
 
406
- If you are interested in other runtime environments, please open or upvote an issue on GitHub.
595
+ ## Contributions
407
596
 
408
- ## Contributing
597
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
598
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
409
599
 
410
- See [the contributing documentation](./CONTRIBUTING.md).
600
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=botshield-sdk&utm_campaign=typescript)