@hookdeck/outpost-sdk 0.8.0 → 0.9.1

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 (255) hide show
  1. package/README.md +35 -2
  2. package/bin/mcp-server.js +386 -114
  3. package/bin/mcp-server.js.map +33 -31
  4. package/dist/commonjs/funcs/attemptsList.d.ts +4 -2
  5. package/dist/commonjs/funcs/attemptsList.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/attemptsList.js +43 -7
  7. package/dist/commonjs/funcs/attemptsList.js.map +1 -1
  8. package/dist/commonjs/funcs/destinationsCreate.d.ts +1 -1
  9. package/dist/commonjs/funcs/destinationsCreate.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/destinationsCreate.js +6 -6
  11. package/dist/commonjs/funcs/destinationsCreate.js.map +1 -1
  12. package/dist/commonjs/funcs/destinationsListAttempts.d.ts +4 -2
  13. package/dist/commonjs/funcs/destinationsListAttempts.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/destinationsListAttempts.js +41 -7
  15. package/dist/commonjs/funcs/destinationsListAttempts.js.map +1 -1
  16. package/dist/commonjs/funcs/destinationsUpdate.d.ts +1 -1
  17. package/dist/commonjs/funcs/destinationsUpdate.d.ts.map +1 -1
  18. package/dist/commonjs/funcs/destinationsUpdate.js +6 -6
  19. package/dist/commonjs/funcs/destinationsUpdate.js.map +1 -1
  20. package/dist/commonjs/funcs/eventsList.d.ts +4 -2
  21. package/dist/commonjs/funcs/eventsList.d.ts.map +1 -1
  22. package/dist/commonjs/funcs/eventsList.js +42 -7
  23. package/dist/commonjs/funcs/eventsList.js.map +1 -1
  24. package/dist/commonjs/funcs/{tenantsListTenants.d.ts → tenantsList.d.ts} +5 -3
  25. package/dist/commonjs/funcs/tenantsList.d.ts.map +1 -0
  26. package/dist/commonjs/funcs/{tenantsListTenants.js → tenantsList.js} +48 -19
  27. package/dist/commonjs/funcs/tenantsList.js.map +1 -0
  28. package/dist/commonjs/funcs/tenantsUpsert.d.ts +1 -1
  29. package/dist/commonjs/funcs/tenantsUpsert.d.ts.map +1 -1
  30. package/dist/commonjs/funcs/tenantsUpsert.js +6 -6
  31. package/dist/commonjs/funcs/tenantsUpsert.js.map +1 -1
  32. package/dist/commonjs/lib/config.d.ts +3 -3
  33. package/dist/commonjs/lib/config.js +3 -3
  34. package/dist/commonjs/lib/config.js.map +1 -1
  35. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  36. package/dist/commonjs/mcp-server/server.js +3 -3
  37. package/dist/commonjs/mcp-server/server.js.map +1 -1
  38. package/dist/commonjs/mcp-server/tools/attemptsList.js +1 -1
  39. package/dist/commonjs/mcp-server/tools/attemptsList.js.map +1 -1
  40. package/dist/commonjs/mcp-server/tools/destinationsCreate.d.ts +1 -1
  41. package/dist/commonjs/mcp-server/tools/destinationsCreate.js +2 -2
  42. package/dist/commonjs/mcp-server/tools/destinationsCreate.js.map +1 -1
  43. package/dist/commonjs/mcp-server/tools/destinationsListAttempts.js +1 -1
  44. package/dist/commonjs/mcp-server/tools/destinationsListAttempts.js.map +1 -1
  45. package/dist/commonjs/mcp-server/tools/destinationsUpdate.d.ts +1 -1
  46. package/dist/commonjs/mcp-server/tools/destinationsUpdate.js +2 -2
  47. package/dist/commonjs/mcp-server/tools/destinationsUpdate.js.map +1 -1
  48. package/dist/commonjs/mcp-server/tools/eventsList.js +1 -1
  49. package/dist/commonjs/mcp-server/tools/eventsList.js.map +1 -1
  50. package/dist/commonjs/mcp-server/tools/tenantsList.d.ts +8 -0
  51. package/dist/commonjs/mcp-server/tools/tenantsList.d.ts.map +1 -0
  52. package/dist/commonjs/mcp-server/tools/{tenantsListTenants.js → tenantsList.js} +8 -12
  53. package/dist/commonjs/mcp-server/tools/tenantsList.js.map +1 -0
  54. package/dist/commonjs/mcp-server/tools/tenantsUpsert.d.ts +1 -1
  55. package/dist/commonjs/mcp-server/tools/tenantsUpsert.js +2 -2
  56. package/dist/commonjs/mcp-server/tools/tenantsUpsert.js.map +1 -1
  57. package/dist/commonjs/models/components/destinationschemafield.d.ts +1 -0
  58. package/dist/commonjs/models/components/destinationschemafield.d.ts.map +1 -1
  59. package/dist/commonjs/models/components/destinationschemafield.js +1 -0
  60. package/dist/commonjs/models/components/destinationschemafield.js.map +1 -1
  61. package/dist/commonjs/models/operations/createtenantdestination.d.ts +2 -2
  62. package/dist/commonjs/models/operations/createtenantdestination.d.ts.map +1 -1
  63. package/dist/commonjs/models/operations/createtenantdestination.js +2 -2
  64. package/dist/commonjs/models/operations/createtenantdestination.js.map +1 -1
  65. package/dist/commonjs/models/operations/getattempt.d.ts +2 -2
  66. package/dist/commonjs/models/operations/gettenantdestinationattempt.d.ts +2 -2
  67. package/dist/commonjs/models/operations/listattempts.d.ts +81 -13
  68. package/dist/commonjs/models/operations/listattempts.d.ts.map +1 -1
  69. package/dist/commonjs/models/operations/listattempts.js +78 -7
  70. package/dist/commonjs/models/operations/listattempts.js.map +1 -1
  71. package/dist/commonjs/models/operations/listevents.d.ts +66 -5
  72. package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
  73. package/dist/commonjs/models/operations/listevents.js +64 -3
  74. package/dist/commonjs/models/operations/listevents.js.map +1 -1
  75. package/dist/commonjs/models/operations/listtenantdestinationattempts.d.ts +43 -7
  76. package/dist/commonjs/models/operations/listtenantdestinationattempts.d.ts.map +1 -1
  77. package/dist/commonjs/models/operations/listtenantdestinationattempts.js +50 -3
  78. package/dist/commonjs/models/operations/listtenantdestinationattempts.js.map +1 -1
  79. package/dist/commonjs/models/operations/listtenantdestinations.d.ts +4 -4
  80. package/dist/commonjs/models/operations/listtenants.d.ts +31 -0
  81. package/dist/commonjs/models/operations/listtenants.d.ts.map +1 -1
  82. package/dist/commonjs/models/operations/listtenants.js +41 -1
  83. package/dist/commonjs/models/operations/listtenants.js.map +1 -1
  84. package/dist/commonjs/models/operations/updatetenantdestination.d.ts +2 -2
  85. package/dist/commonjs/models/operations/updatetenantdestination.d.ts.map +1 -1
  86. package/dist/commonjs/models/operations/updatetenantdestination.js +2 -2
  87. package/dist/commonjs/models/operations/updatetenantdestination.js.map +1 -1
  88. package/dist/commonjs/models/operations/upserttenant.d.ts +2 -2
  89. package/dist/commonjs/models/operations/upserttenant.d.ts.map +1 -1
  90. package/dist/commonjs/models/operations/upserttenant.js +2 -2
  91. package/dist/commonjs/models/operations/upserttenant.js.map +1 -1
  92. package/dist/commonjs/sdk/attempts.d.ts +4 -1
  93. package/dist/commonjs/sdk/attempts.d.ts.map +1 -1
  94. package/dist/commonjs/sdk/attempts.js +2 -1
  95. package/dist/commonjs/sdk/attempts.js.map +1 -1
  96. package/dist/commonjs/sdk/destinations.d.ts +6 -3
  97. package/dist/commonjs/sdk/destinations.d.ts.map +1 -1
  98. package/dist/commonjs/sdk/destinations.js +6 -5
  99. package/dist/commonjs/sdk/destinations.js.map +1 -1
  100. package/dist/commonjs/sdk/events.d.ts +4 -1
  101. package/dist/commonjs/sdk/events.d.ts.map +1 -1
  102. package/dist/commonjs/sdk/events.js +2 -1
  103. package/dist/commonjs/sdk/events.js.map +1 -1
  104. package/dist/commonjs/sdk/tenants.d.ts +5 -2
  105. package/dist/commonjs/sdk/tenants.d.ts.map +1 -1
  106. package/dist/commonjs/sdk/tenants.js +6 -5
  107. package/dist/commonjs/sdk/tenants.js.map +1 -1
  108. package/dist/esm/funcs/attemptsList.d.ts +4 -2
  109. package/dist/esm/funcs/attemptsList.d.ts.map +1 -1
  110. package/dist/esm/funcs/attemptsList.js +43 -7
  111. package/dist/esm/funcs/attemptsList.js.map +1 -1
  112. package/dist/esm/funcs/destinationsCreate.d.ts +1 -1
  113. package/dist/esm/funcs/destinationsCreate.d.ts.map +1 -1
  114. package/dist/esm/funcs/destinationsCreate.js +6 -6
  115. package/dist/esm/funcs/destinationsCreate.js.map +1 -1
  116. package/dist/esm/funcs/destinationsListAttempts.d.ts +4 -2
  117. package/dist/esm/funcs/destinationsListAttempts.d.ts.map +1 -1
  118. package/dist/esm/funcs/destinationsListAttempts.js +41 -7
  119. package/dist/esm/funcs/destinationsListAttempts.js.map +1 -1
  120. package/dist/esm/funcs/destinationsUpdate.d.ts +1 -1
  121. package/dist/esm/funcs/destinationsUpdate.d.ts.map +1 -1
  122. package/dist/esm/funcs/destinationsUpdate.js +6 -6
  123. package/dist/esm/funcs/destinationsUpdate.js.map +1 -1
  124. package/dist/esm/funcs/eventsList.d.ts +4 -2
  125. package/dist/esm/funcs/eventsList.d.ts.map +1 -1
  126. package/dist/esm/funcs/eventsList.js +42 -7
  127. package/dist/esm/funcs/eventsList.js.map +1 -1
  128. package/dist/esm/funcs/{tenantsListTenants.d.ts → tenantsList.d.ts} +5 -3
  129. package/dist/esm/funcs/tenantsList.d.ts.map +1 -0
  130. package/dist/esm/funcs/{tenantsListTenants.js → tenantsList.js} +47 -18
  131. package/dist/esm/funcs/tenantsList.js.map +1 -0
  132. package/dist/esm/funcs/tenantsUpsert.d.ts +1 -1
  133. package/dist/esm/funcs/tenantsUpsert.d.ts.map +1 -1
  134. package/dist/esm/funcs/tenantsUpsert.js +6 -6
  135. package/dist/esm/funcs/tenantsUpsert.js.map +1 -1
  136. package/dist/esm/lib/config.d.ts +3 -3
  137. package/dist/esm/lib/config.js +3 -3
  138. package/dist/esm/lib/config.js.map +1 -1
  139. package/dist/esm/mcp-server/mcp-server.js +1 -1
  140. package/dist/esm/mcp-server/server.js +3 -3
  141. package/dist/esm/mcp-server/server.js.map +1 -1
  142. package/dist/esm/mcp-server/tools/attemptsList.js +1 -1
  143. package/dist/esm/mcp-server/tools/attemptsList.js.map +1 -1
  144. package/dist/esm/mcp-server/tools/destinationsCreate.d.ts +1 -1
  145. package/dist/esm/mcp-server/tools/destinationsCreate.js +2 -2
  146. package/dist/esm/mcp-server/tools/destinationsCreate.js.map +1 -1
  147. package/dist/esm/mcp-server/tools/destinationsListAttempts.js +1 -1
  148. package/dist/esm/mcp-server/tools/destinationsListAttempts.js.map +1 -1
  149. package/dist/esm/mcp-server/tools/destinationsUpdate.d.ts +1 -1
  150. package/dist/esm/mcp-server/tools/destinationsUpdate.js +2 -2
  151. package/dist/esm/mcp-server/tools/destinationsUpdate.js.map +1 -1
  152. package/dist/esm/mcp-server/tools/eventsList.js +1 -1
  153. package/dist/esm/mcp-server/tools/eventsList.js.map +1 -1
  154. package/dist/esm/mcp-server/tools/tenantsList.d.ts +8 -0
  155. package/dist/esm/mcp-server/tools/tenantsList.d.ts.map +1 -0
  156. package/dist/esm/mcp-server/tools/{tenantsListTenants.js → tenantsList.js} +7 -11
  157. package/dist/esm/mcp-server/tools/tenantsList.js.map +1 -0
  158. package/dist/esm/mcp-server/tools/tenantsUpsert.d.ts +1 -1
  159. package/dist/esm/mcp-server/tools/tenantsUpsert.js +2 -2
  160. package/dist/esm/mcp-server/tools/tenantsUpsert.js.map +1 -1
  161. package/dist/esm/models/components/destinationschemafield.d.ts +1 -0
  162. package/dist/esm/models/components/destinationschemafield.d.ts.map +1 -1
  163. package/dist/esm/models/components/destinationschemafield.js +1 -0
  164. package/dist/esm/models/components/destinationschemafield.js.map +1 -1
  165. package/dist/esm/models/operations/createtenantdestination.d.ts +2 -2
  166. package/dist/esm/models/operations/createtenantdestination.d.ts.map +1 -1
  167. package/dist/esm/models/operations/createtenantdestination.js +2 -2
  168. package/dist/esm/models/operations/createtenantdestination.js.map +1 -1
  169. package/dist/esm/models/operations/getattempt.d.ts +2 -2
  170. package/dist/esm/models/operations/gettenantdestinationattempt.d.ts +2 -2
  171. package/dist/esm/models/operations/listattempts.d.ts +81 -13
  172. package/dist/esm/models/operations/listattempts.d.ts.map +1 -1
  173. package/dist/esm/models/operations/listattempts.js +69 -6
  174. package/dist/esm/models/operations/listattempts.js.map +1 -1
  175. package/dist/esm/models/operations/listevents.d.ts +66 -5
  176. package/dist/esm/models/operations/listevents.d.ts.map +1 -1
  177. package/dist/esm/models/operations/listevents.js +57 -2
  178. package/dist/esm/models/operations/listevents.js.map +1 -1
  179. package/dist/esm/models/operations/listtenantdestinationattempts.d.ts +43 -7
  180. package/dist/esm/models/operations/listtenantdestinationattempts.d.ts.map +1 -1
  181. package/dist/esm/models/operations/listtenantdestinationattempts.js +45 -2
  182. package/dist/esm/models/operations/listtenantdestinationattempts.js.map +1 -1
  183. package/dist/esm/models/operations/listtenantdestinations.d.ts +4 -4
  184. package/dist/esm/models/operations/listtenants.d.ts +31 -0
  185. package/dist/esm/models/operations/listtenants.d.ts.map +1 -1
  186. package/dist/esm/models/operations/listtenants.js +36 -0
  187. package/dist/esm/models/operations/listtenants.js.map +1 -1
  188. package/dist/esm/models/operations/updatetenantdestination.d.ts +2 -2
  189. package/dist/esm/models/operations/updatetenantdestination.d.ts.map +1 -1
  190. package/dist/esm/models/operations/updatetenantdestination.js +2 -2
  191. package/dist/esm/models/operations/updatetenantdestination.js.map +1 -1
  192. package/dist/esm/models/operations/upserttenant.d.ts +2 -2
  193. package/dist/esm/models/operations/upserttenant.d.ts.map +1 -1
  194. package/dist/esm/models/operations/upserttenant.js +2 -2
  195. package/dist/esm/models/operations/upserttenant.js.map +1 -1
  196. package/dist/esm/sdk/attempts.d.ts +4 -1
  197. package/dist/esm/sdk/attempts.d.ts.map +1 -1
  198. package/dist/esm/sdk/attempts.js +2 -1
  199. package/dist/esm/sdk/attempts.js.map +1 -1
  200. package/dist/esm/sdk/destinations.d.ts +6 -3
  201. package/dist/esm/sdk/destinations.d.ts.map +1 -1
  202. package/dist/esm/sdk/destinations.js +6 -5
  203. package/dist/esm/sdk/destinations.js.map +1 -1
  204. package/dist/esm/sdk/events.d.ts +4 -1
  205. package/dist/esm/sdk/events.d.ts.map +1 -1
  206. package/dist/esm/sdk/events.js +2 -1
  207. package/dist/esm/sdk/events.js.map +1 -1
  208. package/dist/esm/sdk/tenants.d.ts +5 -2
  209. package/dist/esm/sdk/tenants.d.ts.map +1 -1
  210. package/dist/esm/sdk/tenants.js +6 -5
  211. package/dist/esm/sdk/tenants.js.map +1 -1
  212. package/jsr.json +1 -1
  213. package/package.json +1 -1
  214. package/src/funcs/attemptsList.ts +107 -33
  215. package/src/funcs/destinationsCreate.ts +6 -6
  216. package/src/funcs/destinationsListAttempts.ts +112 -35
  217. package/src/funcs/destinationsUpdate.ts +6 -6
  218. package/src/funcs/eventsList.ts +106 -33
  219. package/src/funcs/{tenantsListTenants.ts → tenantsList.ts} +117 -58
  220. package/src/funcs/tenantsUpsert.ts +6 -6
  221. package/src/lib/config.ts +3 -3
  222. package/src/mcp-server/mcp-server.ts +1 -1
  223. package/src/mcp-server/server.ts +3 -3
  224. package/src/mcp-server/tools/attemptsList.ts +1 -1
  225. package/src/mcp-server/tools/destinationsCreate.ts +2 -2
  226. package/src/mcp-server/tools/destinationsListAttempts.ts +1 -1
  227. package/src/mcp-server/tools/destinationsUpdate.ts +2 -2
  228. package/src/mcp-server/tools/eventsList.ts +1 -1
  229. package/src/mcp-server/tools/{tenantsListTenants.ts → tenantsList.ts} +7 -14
  230. package/src/mcp-server/tools/tenantsUpsert.ts +2 -2
  231. package/src/models/components/destinationschemafield.ts +1 -0
  232. package/src/models/operations/createtenantdestination.ts +4 -4
  233. package/src/models/operations/getattempt.ts +2 -2
  234. package/src/models/operations/gettenantdestinationattempt.ts +2 -2
  235. package/src/models/operations/listattempts.ts +209 -19
  236. package/src/models/operations/listevents.ts +166 -7
  237. package/src/models/operations/listtenantdestinationattempts.ts +127 -9
  238. package/src/models/operations/listtenantdestinations.ts +4 -4
  239. package/src/models/operations/listtenants.ts +94 -0
  240. package/src/models/operations/updatetenantdestination.ts +4 -4
  241. package/src/models/operations/upserttenant.ts +4 -4
  242. package/src/sdk/attempts.ts +5 -2
  243. package/src/sdk/destinations.ts +12 -6
  244. package/src/sdk/events.ts +3 -2
  245. package/src/sdk/tenants.ts +9 -14
  246. package/dist/commonjs/funcs/tenantsListTenants.d.ts.map +0 -1
  247. package/dist/commonjs/funcs/tenantsListTenants.js.map +0 -1
  248. package/dist/commonjs/mcp-server/tools/tenantsListTenants.d.ts +0 -14
  249. package/dist/commonjs/mcp-server/tools/tenantsListTenants.d.ts.map +0 -1
  250. package/dist/commonjs/mcp-server/tools/tenantsListTenants.js.map +0 -1
  251. package/dist/esm/funcs/tenantsListTenants.d.ts.map +0 -1
  252. package/dist/esm/funcs/tenantsListTenants.js.map +0 -1
  253. package/dist/esm/mcp-server/tools/tenantsListTenants.d.ts +0 -14
  254. package/dist/esm/mcp-server/tools/tenantsListTenants.d.ts.map +0 -1
  255. package/dist/esm/mcp-server/tools/tenantsListTenants.js.map +0 -1
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OutpostCore } from "../core.js";
6
+ import { dlv } from "../lib/dlv.js";
6
7
  import { encodeFormQuery } from "../lib/encodings.js";
7
8
  import * as M from "../lib/matchers.js";
8
9
  import { compactMap } from "../lib/primitives.js";
@@ -10,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
10
11
  import { RequestOptions } from "../lib/sdks.js";
11
12
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
13
  import { pathToFunc } from "../lib/url.js";
13
- import * as components from "../models/components/index.js";
14
14
  import {
15
15
  ConnectionError,
16
16
  InvalidRequestError,
@@ -25,6 +25,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
25
  import * as operations from "../models/operations/index.js";
26
26
  import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
+ import {
29
+ createPageIterator,
30
+ haltIterator,
31
+ PageIterator,
32
+ Paginator,
33
+ } from "../types/operations.js";
28
34
 
29
35
  /**
30
36
  * List Tenants
@@ -37,51 +43,14 @@ import { Result } from "../types/fp.js";
37
43
  *
38
44
  * When authenticated with a Tenant JWT, returns only the authenticated tenant. Pagination is not used in this case.
39
45
  */
40
- export function tenantsListTenants(
46
+ export function tenantsList(
41
47
  client: OutpostCore,
42
- limit?: number | undefined,
43
- dir?: operations.ListTenantsDir | undefined,
44
- next?: string | undefined,
45
- prev?: string | undefined,
48
+ request: operations.ListTenantsRequest,
46
49
  options?: RequestOptions,
47
50
  ): APIPromise<
48
- Result<
49
- components.TenantPaginatedResult,
50
- | errors.BadRequestError
51
- | errors.UnauthorizedError
52
- | errors.InternalServerError
53
- | errors.NotImplementedError
54
- | OutpostError
55
- | ResponseValidationError
56
- | ConnectionError
57
- | RequestAbortedError
58
- | RequestTimeoutError
59
- | InvalidRequestError
60
- | UnexpectedClientError
61
- | SDKValidationError
62
- >
63
- > {
64
- return new APIPromise($do(
65
- client,
66
- limit,
67
- dir,
68
- next,
69
- prev,
70
- options,
71
- ));
72
- }
73
-
74
- async function $do(
75
- client: OutpostCore,
76
- limit?: number | undefined,
77
- dir?: operations.ListTenantsDir | undefined,
78
- next?: string | undefined,
79
- prev?: string | undefined,
80
- options?: RequestOptions,
81
- ): Promise<
82
- [
51
+ PageIterator<
83
52
  Result<
84
- components.TenantPaginatedResult,
53
+ operations.ListTenantsResponse,
85
54
  | errors.BadRequestError
86
55
  | errors.UnauthorizedError
87
56
  | errors.InternalServerError
@@ -95,23 +64,50 @@ async function $do(
95
64
  | UnexpectedClientError
96
65
  | SDKValidationError
97
66
  >,
67
+ { cursor: string }
68
+ >
69
+ > {
70
+ return new APIPromise($do(
71
+ client,
72
+ request,
73
+ options,
74
+ ));
75
+ }
76
+
77
+ async function $do(
78
+ client: OutpostCore,
79
+ request: operations.ListTenantsRequest,
80
+ options?: RequestOptions,
81
+ ): Promise<
82
+ [
83
+ PageIterator<
84
+ Result<
85
+ operations.ListTenantsResponse,
86
+ | errors.BadRequestError
87
+ | errors.UnauthorizedError
88
+ | errors.InternalServerError
89
+ | errors.NotImplementedError
90
+ | OutpostError
91
+ | ResponseValidationError
92
+ | ConnectionError
93
+ | RequestAbortedError
94
+ | RequestTimeoutError
95
+ | InvalidRequestError
96
+ | UnexpectedClientError
97
+ | SDKValidationError
98
+ >,
99
+ { cursor: string }
100
+ >,
98
101
  APICall,
99
102
  ]
100
103
  > {
101
- const input: operations.ListTenantsRequest = {
102
- limit: limit,
103
- dir: dir,
104
- next: next,
105
- prev: prev,
106
- };
107
-
108
104
  const parsed = safeParse(
109
- input,
105
+ request,
110
106
  (value) => operations.ListTenantsRequest$outboundSchema.parse(value),
111
107
  "Input validation failed",
112
108
  );
113
109
  if (!parsed.ok) {
114
- return [parsed, { status: "invalid" }];
110
+ return [haltIterator(parsed), { status: "invalid" }];
115
111
  }
116
112
  const payload = parsed.value;
117
113
  const body = null;
@@ -120,6 +116,7 @@ async function $do(
120
116
 
121
117
  const query = encodeFormQuery({
122
118
  "dir": payload.dir,
119
+ "id": payload.id,
123
120
  "limit": payload.limit,
124
121
  "next": payload.next,
125
122
  "prev": payload.prev,
@@ -160,7 +157,7 @@ async function $do(
160
157
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
161
158
  }, options);
162
159
  if (!requestRes.ok) {
163
- return [requestRes, { status: "invalid" }];
160
+ return [haltIterator(requestRes), { status: "invalid" }];
164
161
  }
165
162
  const req = requestRes.value;
166
163
 
@@ -171,7 +168,7 @@ async function $do(
171
168
  retryCodes: context.retryCodes,
172
169
  });
173
170
  if (!doResult.ok) {
174
- return [doResult, { status: "request-error", request: req }];
171
+ return [haltIterator(doResult), { status: "request-error", request: req }];
175
172
  }
176
173
  const response = doResult.value;
177
174
 
@@ -179,8 +176,8 @@ async function $do(
179
176
  HttpMeta: { Response: response, Request: req },
180
177
  };
181
178
 
182
- const [result] = await M.match<
183
- components.TenantPaginatedResult,
179
+ const [result, raw] = await M.match<
180
+ operations.ListTenantsResponse,
184
181
  | errors.BadRequestError
185
182
  | errors.UnauthorizedError
186
183
  | errors.InternalServerError
@@ -194,7 +191,9 @@ async function $do(
194
191
  | UnexpectedClientError
195
192
  | SDKValidationError
196
193
  >(
197
- M.json(200, components.TenantPaginatedResult$inboundSchema),
194
+ M.json(200, operations.ListTenantsResponse$inboundSchema, {
195
+ key: "Result",
196
+ }),
198
197
  M.jsonErr(400, errors.BadRequestError$inboundSchema),
199
198
  M.jsonErr(401, errors.UnauthorizedError$inboundSchema),
200
199
  M.jsonErr(500, errors.InternalServerError$inboundSchema),
@@ -203,8 +202,68 @@ async function $do(
203
202
  M.fail("5XX"),
204
203
  )(response, req, { extraFields: responseFields });
205
204
  if (!result.ok) {
206
- return [result, { status: "complete", request: req, response }];
205
+ return [haltIterator(result), {
206
+ status: "complete",
207
+ request: req,
208
+ response,
209
+ }];
207
210
  }
208
211
 
209
- return [result, { status: "complete", request: req, response }];
212
+ const nextFunc = (
213
+ responseData: unknown,
214
+ ): {
215
+ next: Paginator<
216
+ Result<
217
+ operations.ListTenantsResponse,
218
+ | errors.BadRequestError
219
+ | errors.UnauthorizedError
220
+ | errors.InternalServerError
221
+ | errors.NotImplementedError
222
+ | OutpostError
223
+ | ResponseValidationError
224
+ | ConnectionError
225
+ | RequestAbortedError
226
+ | RequestTimeoutError
227
+ | InvalidRequestError
228
+ | UnexpectedClientError
229
+ | SDKValidationError
230
+ >
231
+ >;
232
+ "~next"?: { cursor: string };
233
+ } => {
234
+ const nextCursor = dlv(responseData, "pagination.next");
235
+ if (typeof nextCursor !== "string") {
236
+ return { next: () => null };
237
+ }
238
+ if (nextCursor.trim() === "") {
239
+ return { next: () => null };
240
+ }
241
+ const results = dlv(responseData, "models");
242
+ if (!Array.isArray(results) || !results.length) {
243
+ return { next: () => null };
244
+ }
245
+ const limit = request?.limit ?? 20;
246
+ if (results.length < limit) {
247
+ return { next: () => null };
248
+ }
249
+
250
+ const nextVal = () =>
251
+ tenantsList(
252
+ client,
253
+ {
254
+ ...request,
255
+ next: nextCursor,
256
+ },
257
+ options,
258
+ );
259
+
260
+ return { next: nextVal, "~next": { cursor: nextCursor } };
261
+ };
262
+
263
+ const page = { ...result, ...nextFunc(raw) };
264
+ return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
265
+ status: "complete",
266
+ request: req,
267
+ response,
268
+ }];
210
269
  }
@@ -35,7 +35,7 @@ import { Result } from "../types/fp.js";
35
35
  export function tenantsUpsert(
36
36
  client: OutpostCore,
37
37
  tenantId: string,
38
- params?: components.TenantUpsert | undefined,
38
+ body?: components.TenantUpsert | undefined,
39
39
  options?: RequestOptions,
40
40
  ): APIPromise<
41
41
  Result<
@@ -56,7 +56,7 @@ export function tenantsUpsert(
56
56
  return new APIPromise($do(
57
57
  client,
58
58
  tenantId,
59
- params,
59
+ body,
60
60
  options,
61
61
  ));
62
62
  }
@@ -64,7 +64,7 @@ export function tenantsUpsert(
64
64
  async function $do(
65
65
  client: OutpostCore,
66
66
  tenantId: string,
67
- params?: components.TenantUpsert | undefined,
67
+ body?: components.TenantUpsert | undefined,
68
68
  options?: RequestOptions,
69
69
  ): Promise<
70
70
  [
@@ -87,7 +87,7 @@ async function $do(
87
87
  > {
88
88
  const input: operations.UpsertTenantRequest = {
89
89
  tenantId: tenantId,
90
- params: params,
90
+ body: body,
91
91
  };
92
92
 
93
93
  const parsed = safeParse(
@@ -99,7 +99,7 @@ async function $do(
99
99
  return [parsed, { status: "invalid" }];
100
100
  }
101
101
  const payload = parsed.value;
102
- const body = encodeJSON("body", payload.params, { explode: true });
102
+ const body$ = encodeJSON("body", payload.body, { explode: true });
103
103
 
104
104
  const pathParams = {
105
105
  tenant_id: encodeSimple("tenant_id", payload.tenant_id, {
@@ -140,7 +140,7 @@ async function $do(
140
140
  baseURL: options?.serverURL,
141
141
  path: path,
142
142
  headers: headers,
143
- body: body,
143
+ body: body$,
144
144
  userAgent: client._options.userAgent,
145
145
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
146
  }, options);
package/src/lib/config.ts CHANGED
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "0.0.1",
68
- sdkVersion: "0.8.0",
69
- genVersion: "2.849.10",
68
+ sdkVersion: "0.9.1",
69
+ genVersion: "2.865.2",
70
70
  userAgent:
71
- "speakeasy-sdk/typescript 0.8.0 2.849.10 0.0.1 @hookdeck/outpost-sdk",
71
+ "speakeasy-sdk/typescript 0.9.1 2.865.2 0.0.1 @hookdeck/outpost-sdk",
72
72
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.8.0",
22
+ currentVersion: "0.9.1",
23
23
  },
24
24
  });
25
25
 
@@ -35,7 +35,7 @@ import { tool$tenantsDelete } from "./tools/tenantsDelete.js";
35
35
  import { tool$tenantsGet } from "./tools/tenantsGet.js";
36
36
  import { tool$tenantsGetPortalUrl } from "./tools/tenantsGetPortalUrl.js";
37
37
  import { tool$tenantsGetToken } from "./tools/tenantsGetToken.js";
38
- import { tool$tenantsListTenants } from "./tools/tenantsListTenants.js";
38
+ import { tool$tenantsList } from "./tools/tenantsList.js";
39
39
  import { tool$tenantsUpsert } from "./tools/tenantsUpsert.js";
40
40
  import { tool$topicsList } from "./tools/topicsList.js";
41
41
 
@@ -49,7 +49,7 @@ export function createMCPServer(deps: {
49
49
  }) {
50
50
  const server = new McpServer({
51
51
  name: "Outpost",
52
- version: "0.8.0",
52
+ version: "0.9.1",
53
53
  });
54
54
 
55
55
  const client = new OutpostCore({
@@ -80,7 +80,7 @@ export function createMCPServer(deps: {
80
80
  void register; // suppress unused warnings
81
81
 
82
82
  tool(tool$healthCheck);
83
- tool(tool$tenantsListTenants);
83
+ tool(tool$tenantsList);
84
84
  tool(tool$tenantsUpsert);
85
85
  tool(tool$tenantsGet);
86
86
  tool(tool$tenantsDelete);
@@ -34,7 +34,7 @@ When authenticated with Admin API Key, returns attempts across all tenants. Use
34
34
  };
35
35
  }
36
36
 
37
- const value = result.value;
37
+ const value = result.value.result;
38
38
 
39
39
  return formatResult(value, apiCall);
40
40
  },
@@ -9,7 +9,7 @@ import { formatResult, ToolDefinition } from "../tools.js";
9
9
 
10
10
  const args = {
11
11
  tenantId: z.string(),
12
- params: components.DestinationCreate$inboundSchema,
12
+ body: components.DestinationCreate$inboundSchema,
13
13
  };
14
14
 
15
15
  export const tool$destinationsCreate: ToolDefinition<typeof args> = {
@@ -22,7 +22,7 @@ Creates a new destination for the tenant. The request body structure depends on
22
22
  const [result, apiCall] = await destinationsCreate(
23
23
  client,
24
24
  args.tenantId,
25
- args.params,
25
+ args.body,
26
26
  { fetchOptions: { signal: ctx.signal } },
27
27
  ).$inspect();
28
28
 
@@ -30,7 +30,7 @@ Retrieves a paginated list of attempts scoped to a specific destination.`,
30
30
  };
31
31
  }
32
32
 
33
- const value = result.value;
33
+ const value = result.value.result;
34
34
 
35
35
  return formatResult(value, apiCall);
36
36
  },
@@ -10,7 +10,7 @@ import { formatResult, ToolDefinition } from "../tools.js";
10
10
  const args = {
11
11
  tenantId: z.string(),
12
12
  destinationId: z.string(),
13
- params: components.DestinationUpdate$inboundSchema,
13
+ body: components.DestinationUpdate$inboundSchema,
14
14
  };
15
15
 
16
16
  export const tool$destinationsUpdate: ToolDefinition<typeof args> = {
@@ -24,7 +24,7 @@ Updates the configuration of an existing destination. The request body structure
24
24
  client,
25
25
  args.tenantId,
26
26
  args.destinationId,
27
- args.params,
27
+ args.body,
28
28
  { fetchOptions: { signal: ctx.signal } },
29
29
  ).$inspect();
30
30
 
@@ -34,7 +34,7 @@ When authenticated with Admin API Key, returns events across all tenants. Use \`
34
34
  };
35
35
  }
36
36
 
37
- const value = result.value;
37
+ const value = result.value.result;
38
38
 
39
39
  return formatResult(value, apiCall);
40
40
  },
@@ -2,20 +2,16 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import * as z from "zod/v3";
6
- import { tenantsListTenants } from "../../funcs/tenantsListTenants.js";
5
+ import { tenantsList } from "../../funcs/tenantsList.js";
7
6
  import * as operations from "../../models/operations/index.js";
8
7
  import { formatResult, ToolDefinition } from "../tools.js";
9
8
 
10
9
  const args = {
11
- limit: z.number().int().default(20),
12
- dir: operations.ListTenantsDir$inboundSchema.default("desc"),
13
- next: z.string().optional(),
14
- prev: z.string().optional(),
10
+ request: operations.ListTenantsRequest$inboundSchema,
15
11
  };
16
12
 
17
- export const tool$tenantsListTenants: ToolDefinition<typeof args> = {
18
- name: "tenants-list-tenants",
13
+ export const tool$tenantsList: ToolDefinition<typeof args> = {
14
+ name: "tenants-list",
19
15
  description: `List Tenants
20
16
 
21
17
  List all tenants with cursor-based pagination.
@@ -27,12 +23,9 @@ When authenticated with a Tenant JWT, returns only the authenticated tenant. Pag
27
23
  `,
28
24
  args,
29
25
  tool: async (client, args, ctx) => {
30
- const [result, apiCall] = await tenantsListTenants(
26
+ const [result, apiCall] = await tenantsList(
31
27
  client,
32
- args.limit,
33
- args.dir,
34
- args.next,
35
- args.prev,
28
+ args.request,
36
29
  { fetchOptions: { signal: ctx.signal } },
37
30
  ).$inspect();
38
31
 
@@ -43,7 +36,7 @@ When authenticated with a Tenant JWT, returns only the authenticated tenant. Pag
43
36
  };
44
37
  }
45
38
 
46
- const value = result.value;
39
+ const value = result.value.result;
47
40
 
48
41
  return formatResult(value, apiCall);
49
42
  },
@@ -9,7 +9,7 @@ import { formatResult, ToolDefinition } from "../tools.js";
9
9
 
10
10
  const args = {
11
11
  tenantId: z.string(),
12
- params: components.TenantUpsert$inboundSchema.optional(),
12
+ body: components.TenantUpsert$inboundSchema.optional(),
13
13
  };
14
14
 
15
15
  export const tool$tenantsUpsert: ToolDefinition<typeof args> = {
@@ -22,7 +22,7 @@ Idempotently creates or updates a tenant. Required before associating destinatio
22
22
  const [result, apiCall] = await tenantsUpsert(
23
23
  client,
24
24
  args.tenantId,
25
- args.params,
25
+ args.body,
26
26
  { fetchOptions: { signal: ctx.signal } },
27
27
  ).$inspect();
28
28
 
@@ -11,6 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
  export const TypeEnum = {
12
12
  Text: "text",
13
13
  Checkbox: "checkbox",
14
+ KeyValueMap: "key_value_map",
14
15
  } as const;
15
16
  export type TypeEnum = ClosedEnum<typeof TypeEnum>;
16
17
 
@@ -14,7 +14,7 @@ export type CreateTenantDestinationRequest = {
14
14
  * The ID of the tenant. Required when using AdminApiKey authentication.
15
15
  */
16
16
  tenantId: string;
17
- params: components.DestinationCreate;
17
+ body: components.DestinationCreate;
18
18
  };
19
19
 
20
20
  /** @internal */
@@ -24,7 +24,7 @@ export const CreateTenantDestinationRequest$inboundSchema: z.ZodType<
24
24
  unknown
25
25
  > = z.object({
26
26
  tenant_id: z.string(),
27
- params: components.DestinationCreate$inboundSchema,
27
+ body: components.DestinationCreate$inboundSchema,
28
28
  }).transform((v) => {
29
29
  return remap$(v, {
30
30
  "tenant_id": "tenantId",
@@ -33,7 +33,7 @@ export const CreateTenantDestinationRequest$inboundSchema: z.ZodType<
33
33
  /** @internal */
34
34
  export type CreateTenantDestinationRequest$Outbound = {
35
35
  tenant_id: string;
36
- params: components.DestinationCreate$Outbound;
36
+ body: components.DestinationCreate$Outbound;
37
37
  };
38
38
 
39
39
  /** @internal */
@@ -43,7 +43,7 @@ export const CreateTenantDestinationRequest$outboundSchema: z.ZodType<
43
43
  CreateTenantDestinationRequest
44
44
  > = z.object({
45
45
  tenantId: z.string(),
46
- params: components.DestinationCreate$outboundSchema,
46
+ body: components.DestinationCreate$outboundSchema,
47
47
  }).transform((v) => {
48
48
  return remap$(v, {
49
49
  tenantId: "tenant_id",
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * Fields to include in the response. Can be specified multiple times or comma-separated.
12
+ * Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
13
13
  *
14
14
  * @remarks
15
15
  * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
@@ -24,7 +24,7 @@ export type GetAttemptRequest = {
24
24
  */
25
25
  attemptId: string;
26
26
  /**
27
- * Fields to include in the response. Can be specified multiple times or comma-separated.
27
+ * Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
28
28
  *
29
29
  * @remarks
30
30
  * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * Fields to include in the response. Can be specified multiple times or comma-separated.
12
+ * Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
13
13
  *
14
14
  * @remarks
15
15
  * - `event`: Include event summary
@@ -32,7 +32,7 @@ export type GetTenantDestinationAttemptRequest = {
32
32
  */
33
33
  attemptId: string;
34
34
  /**
35
- * Fields to include in the response. Can be specified multiple times or comma-separated.
35
+ * Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
36
36
  *
37
37
  * @remarks
38
38
  * - `event`: Include event summary