@hookdeck/outpost-sdk 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -2
- package/bin/mcp-server.js +384 -113
- package/bin/mcp-server.js.map +32 -30
- package/dist/commonjs/funcs/attemptsList.d.ts +4 -2
- package/dist/commonjs/funcs/attemptsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/attemptsList.js +43 -7
- package/dist/commonjs/funcs/attemptsList.js.map +1 -1
- package/dist/commonjs/funcs/destinationsCreate.d.ts +1 -1
- package/dist/commonjs/funcs/destinationsCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsCreate.js +6 -6
- package/dist/commonjs/funcs/destinationsCreate.js.map +1 -1
- package/dist/commonjs/funcs/destinationsListAttempts.d.ts +4 -2
- package/dist/commonjs/funcs/destinationsListAttempts.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsListAttempts.js +41 -7
- package/dist/commonjs/funcs/destinationsListAttempts.js.map +1 -1
- package/dist/commonjs/funcs/destinationsUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/destinationsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/destinationsUpdate.js +6 -6
- package/dist/commonjs/funcs/destinationsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.d.ts +4 -2
- package/dist/commonjs/funcs/eventsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +42 -7
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/{tenantsListTenants.d.ts → tenantsList.d.ts} +5 -3
- package/dist/commonjs/funcs/tenantsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/{tenantsListTenants.js → tenantsList.js} +48 -19
- package/dist/commonjs/funcs/tenantsList.js.map +1 -0
- package/dist/commonjs/funcs/tenantsUpsert.d.ts +1 -1
- package/dist/commonjs/funcs/tenantsUpsert.d.ts.map +1 -1
- package/dist/commonjs/funcs/tenantsUpsert.js +6 -6
- package/dist/commonjs/funcs/tenantsUpsert.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -3
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/attemptsList.js +1 -1
- package/dist/commonjs/mcp-server/tools/attemptsList.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/destinationsCreate.d.ts +1 -1
- package/dist/commonjs/mcp-server/tools/destinationsCreate.js +2 -2
- package/dist/commonjs/mcp-server/tools/destinationsCreate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/destinationsListAttempts.js +1 -1
- package/dist/commonjs/mcp-server/tools/destinationsListAttempts.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/destinationsUpdate.d.ts +1 -1
- package/dist/commonjs/mcp-server/tools/destinationsUpdate.js +2 -2
- package/dist/commonjs/mcp-server/tools/destinationsUpdate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/eventsList.js +1 -1
- package/dist/commonjs/mcp-server/tools/eventsList.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/tenantsList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/tenantsList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/{tenantsListTenants.js → tenantsList.js} +8 -12
- package/dist/commonjs/mcp-server/tools/tenantsList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/tenantsUpsert.d.ts +1 -1
- package/dist/commonjs/mcp-server/tools/tenantsUpsert.js +2 -2
- package/dist/commonjs/mcp-server/tools/tenantsUpsert.js.map +1 -1
- package/dist/commonjs/models/operations/createtenantdestination.d.ts +2 -2
- package/dist/commonjs/models/operations/createtenantdestination.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createtenantdestination.js +2 -2
- package/dist/commonjs/models/operations/createtenantdestination.js.map +1 -1
- package/dist/commonjs/models/operations/getattempt.d.ts +2 -2
- package/dist/commonjs/models/operations/gettenantdestinationattempt.d.ts +2 -2
- package/dist/commonjs/models/operations/listattempts.d.ts +81 -13
- package/dist/commonjs/models/operations/listattempts.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listattempts.js +78 -7
- package/dist/commonjs/models/operations/listattempts.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +66 -5
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +64 -3
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listtenantdestinationattempts.d.ts +43 -7
- package/dist/commonjs/models/operations/listtenantdestinationattempts.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listtenantdestinationattempts.js +50 -3
- package/dist/commonjs/models/operations/listtenantdestinationattempts.js.map +1 -1
- package/dist/commonjs/models/operations/listtenantdestinations.d.ts +4 -4
- package/dist/commonjs/models/operations/listtenants.d.ts +31 -0
- package/dist/commonjs/models/operations/listtenants.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listtenants.js +41 -1
- package/dist/commonjs/models/operations/listtenants.js.map +1 -1
- package/dist/commonjs/models/operations/updatetenantdestination.d.ts +2 -2
- package/dist/commonjs/models/operations/updatetenantdestination.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatetenantdestination.js +2 -2
- package/dist/commonjs/models/operations/updatetenantdestination.js.map +1 -1
- package/dist/commonjs/models/operations/upserttenant.d.ts +2 -2
- package/dist/commonjs/models/operations/upserttenant.d.ts.map +1 -1
- package/dist/commonjs/models/operations/upserttenant.js +2 -2
- package/dist/commonjs/models/operations/upserttenant.js.map +1 -1
- package/dist/commonjs/sdk/attempts.d.ts +4 -1
- package/dist/commonjs/sdk/attempts.d.ts.map +1 -1
- package/dist/commonjs/sdk/attempts.js +2 -1
- package/dist/commonjs/sdk/attempts.js.map +1 -1
- package/dist/commonjs/sdk/destinations.d.ts +6 -3
- package/dist/commonjs/sdk/destinations.d.ts.map +1 -1
- package/dist/commonjs/sdk/destinations.js +6 -5
- package/dist/commonjs/sdk/destinations.js.map +1 -1
- package/dist/commonjs/sdk/events.d.ts +4 -1
- package/dist/commonjs/sdk/events.d.ts.map +1 -1
- package/dist/commonjs/sdk/events.js +2 -1
- package/dist/commonjs/sdk/events.js.map +1 -1
- package/dist/commonjs/sdk/tenants.d.ts +5 -2
- package/dist/commonjs/sdk/tenants.d.ts.map +1 -1
- package/dist/commonjs/sdk/tenants.js +6 -5
- package/dist/commonjs/sdk/tenants.js.map +1 -1
- package/dist/esm/funcs/attemptsList.d.ts +4 -2
- package/dist/esm/funcs/attemptsList.d.ts.map +1 -1
- package/dist/esm/funcs/attemptsList.js +43 -7
- package/dist/esm/funcs/attemptsList.js.map +1 -1
- package/dist/esm/funcs/destinationsCreate.d.ts +1 -1
- package/dist/esm/funcs/destinationsCreate.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsCreate.js +6 -6
- package/dist/esm/funcs/destinationsCreate.js.map +1 -1
- package/dist/esm/funcs/destinationsListAttempts.d.ts +4 -2
- package/dist/esm/funcs/destinationsListAttempts.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsListAttempts.js +41 -7
- package/dist/esm/funcs/destinationsListAttempts.js.map +1 -1
- package/dist/esm/funcs/destinationsUpdate.d.ts +1 -1
- package/dist/esm/funcs/destinationsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/destinationsUpdate.js +6 -6
- package/dist/esm/funcs/destinationsUpdate.js.map +1 -1
- package/dist/esm/funcs/eventsList.d.ts +4 -2
- package/dist/esm/funcs/eventsList.d.ts.map +1 -1
- package/dist/esm/funcs/eventsList.js +42 -7
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/{tenantsListTenants.d.ts → tenantsList.d.ts} +5 -3
- package/dist/esm/funcs/tenantsList.d.ts.map +1 -0
- package/dist/esm/funcs/{tenantsListTenants.js → tenantsList.js} +47 -18
- package/dist/esm/funcs/tenantsList.js.map +1 -0
- package/dist/esm/funcs/tenantsUpsert.d.ts +1 -1
- package/dist/esm/funcs/tenantsUpsert.d.ts.map +1 -1
- package/dist/esm/funcs/tenantsUpsert.js +6 -6
- package/dist/esm/funcs/tenantsUpsert.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +3 -3
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/attemptsList.js +1 -1
- package/dist/esm/mcp-server/tools/attemptsList.js.map +1 -1
- package/dist/esm/mcp-server/tools/destinationsCreate.d.ts +1 -1
- package/dist/esm/mcp-server/tools/destinationsCreate.js +2 -2
- package/dist/esm/mcp-server/tools/destinationsCreate.js.map +1 -1
- package/dist/esm/mcp-server/tools/destinationsListAttempts.js +1 -1
- package/dist/esm/mcp-server/tools/destinationsListAttempts.js.map +1 -1
- package/dist/esm/mcp-server/tools/destinationsUpdate.d.ts +1 -1
- package/dist/esm/mcp-server/tools/destinationsUpdate.js +2 -2
- package/dist/esm/mcp-server/tools/destinationsUpdate.js.map +1 -1
- package/dist/esm/mcp-server/tools/eventsList.js +1 -1
- package/dist/esm/mcp-server/tools/eventsList.js.map +1 -1
- package/dist/esm/mcp-server/tools/tenantsList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/tenantsList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/{tenantsListTenants.js → tenantsList.js} +7 -11
- package/dist/esm/mcp-server/tools/tenantsList.js.map +1 -0
- package/dist/esm/mcp-server/tools/tenantsUpsert.d.ts +1 -1
- package/dist/esm/mcp-server/tools/tenantsUpsert.js +2 -2
- package/dist/esm/mcp-server/tools/tenantsUpsert.js.map +1 -1
- package/dist/esm/models/operations/createtenantdestination.d.ts +2 -2
- package/dist/esm/models/operations/createtenantdestination.d.ts.map +1 -1
- package/dist/esm/models/operations/createtenantdestination.js +2 -2
- package/dist/esm/models/operations/createtenantdestination.js.map +1 -1
- package/dist/esm/models/operations/getattempt.d.ts +2 -2
- package/dist/esm/models/operations/gettenantdestinationattempt.d.ts +2 -2
- package/dist/esm/models/operations/listattempts.d.ts +81 -13
- package/dist/esm/models/operations/listattempts.d.ts.map +1 -1
- package/dist/esm/models/operations/listattempts.js +69 -6
- package/dist/esm/models/operations/listattempts.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +66 -5
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +57 -2
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listtenantdestinationattempts.d.ts +43 -7
- package/dist/esm/models/operations/listtenantdestinationattempts.d.ts.map +1 -1
- package/dist/esm/models/operations/listtenantdestinationattempts.js +45 -2
- package/dist/esm/models/operations/listtenantdestinationattempts.js.map +1 -1
- package/dist/esm/models/operations/listtenantdestinations.d.ts +4 -4
- package/dist/esm/models/operations/listtenants.d.ts +31 -0
- package/dist/esm/models/operations/listtenants.d.ts.map +1 -1
- package/dist/esm/models/operations/listtenants.js +36 -0
- package/dist/esm/models/operations/listtenants.js.map +1 -1
- package/dist/esm/models/operations/updatetenantdestination.d.ts +2 -2
- package/dist/esm/models/operations/updatetenantdestination.d.ts.map +1 -1
- package/dist/esm/models/operations/updatetenantdestination.js +2 -2
- package/dist/esm/models/operations/updatetenantdestination.js.map +1 -1
- package/dist/esm/models/operations/upserttenant.d.ts +2 -2
- package/dist/esm/models/operations/upserttenant.d.ts.map +1 -1
- package/dist/esm/models/operations/upserttenant.js +2 -2
- package/dist/esm/models/operations/upserttenant.js.map +1 -1
- package/dist/esm/sdk/attempts.d.ts +4 -1
- package/dist/esm/sdk/attempts.d.ts.map +1 -1
- package/dist/esm/sdk/attempts.js +2 -1
- package/dist/esm/sdk/attempts.js.map +1 -1
- package/dist/esm/sdk/destinations.d.ts +6 -3
- package/dist/esm/sdk/destinations.d.ts.map +1 -1
- package/dist/esm/sdk/destinations.js +6 -5
- package/dist/esm/sdk/destinations.js.map +1 -1
- package/dist/esm/sdk/events.d.ts +4 -1
- package/dist/esm/sdk/events.d.ts.map +1 -1
- package/dist/esm/sdk/events.js +2 -1
- package/dist/esm/sdk/events.js.map +1 -1
- package/dist/esm/sdk/tenants.d.ts +5 -2
- package/dist/esm/sdk/tenants.d.ts.map +1 -1
- package/dist/esm/sdk/tenants.js +6 -5
- package/dist/esm/sdk/tenants.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/attemptsList.ts +107 -33
- package/src/funcs/destinationsCreate.ts +6 -6
- package/src/funcs/destinationsListAttempts.ts +112 -35
- package/src/funcs/destinationsUpdate.ts +6 -6
- package/src/funcs/eventsList.ts +106 -33
- package/src/funcs/{tenantsListTenants.ts → tenantsList.ts} +117 -58
- package/src/funcs/tenantsUpsert.ts +6 -6
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/mcp-server/tools/attemptsList.ts +1 -1
- package/src/mcp-server/tools/destinationsCreate.ts +2 -2
- package/src/mcp-server/tools/destinationsListAttempts.ts +1 -1
- package/src/mcp-server/tools/destinationsUpdate.ts +2 -2
- package/src/mcp-server/tools/eventsList.ts +1 -1
- package/src/mcp-server/tools/{tenantsListTenants.ts → tenantsList.ts} +7 -14
- package/src/mcp-server/tools/tenantsUpsert.ts +2 -2
- package/src/models/operations/createtenantdestination.ts +4 -4
- package/src/models/operations/getattempt.ts +2 -2
- package/src/models/operations/gettenantdestinationattempt.ts +2 -2
- package/src/models/operations/listattempts.ts +209 -19
- package/src/models/operations/listevents.ts +166 -7
- package/src/models/operations/listtenantdestinationattempts.ts +127 -9
- package/src/models/operations/listtenantdestinations.ts +4 -4
- package/src/models/operations/listtenants.ts +94 -0
- package/src/models/operations/updatetenantdestination.ts +4 -4
- package/src/models/operations/upserttenant.ts +4 -4
- package/src/sdk/attempts.ts +5 -2
- package/src/sdk/destinations.ts +12 -6
- package/src/sdk/events.ts +3 -2
- package/src/sdk/tenants.ts +9 -14
- package/dist/commonjs/funcs/tenantsListTenants.d.ts.map +0 -1
- package/dist/commonjs/funcs/tenantsListTenants.js.map +0 -1
- package/dist/commonjs/mcp-server/tools/tenantsListTenants.d.ts +0 -14
- package/dist/commonjs/mcp-server/tools/tenantsListTenants.d.ts.map +0 -1
- package/dist/commonjs/mcp-server/tools/tenantsListTenants.js.map +0 -1
- package/dist/esm/funcs/tenantsListTenants.d.ts.map +0 -1
- package/dist/esm/funcs/tenantsListTenants.js.map +0 -1
- package/dist/esm/mcp-server/tools/tenantsListTenants.d.ts +0 -14
- package/dist/esm/mcp-server/tools/tenantsListTenants.d.ts.map +0 -1
- 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
|
|
46
|
+
export function tenantsList(
|
|
41
47
|
client: OutpostCore,
|
|
42
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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, {
|
|
205
|
+
return [haltIterator(result), {
|
|
206
|
+
status: "complete",
|
|
207
|
+
request: req,
|
|
208
|
+
response,
|
|
209
|
+
}];
|
|
207
210
|
}
|
|
208
211
|
|
|
209
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
69
|
-
genVersion: "2.
|
|
68
|
+
sdkVersion: "0.9.0",
|
|
69
|
+
genVersion: "2.862.0",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/typescript 0.
|
|
71
|
+
"speakeasy-sdk/typescript 0.9.0 2.862.0 0.0.1 @hookdeck/outpost-sdk",
|
|
72
72
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -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$
|
|
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.
|
|
52
|
+
version: "0.9.0",
|
|
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$
|
|
83
|
+
tool(tool$tenantsList);
|
|
84
84
|
tool(tool$tenantsUpsert);
|
|
85
85
|
tool(tool$tenantsGet);
|
|
86
86
|
tool(tool$tenantsDelete);
|
|
@@ -9,7 +9,7 @@ import { formatResult, ToolDefinition } from "../tools.js";
|
|
|
9
9
|
|
|
10
10
|
const args = {
|
|
11
11
|
tenantId: z.string(),
|
|
12
|
-
|
|
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.
|
|
25
|
+
args.body,
|
|
26
26
|
{ fetchOptions: { signal: ctx.signal } },
|
|
27
27
|
).$inspect();
|
|
28
28
|
|
|
@@ -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
|
-
|
|
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.
|
|
27
|
+
args.body,
|
|
28
28
|
{ fetchOptions: { signal: ctx.signal } },
|
|
29
29
|
).$inspect();
|
|
30
30
|
|
|
@@ -2,20 +2,16 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import
|
|
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
|
-
|
|
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$
|
|
18
|
-
name: "tenants-list
|
|
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
|
|
26
|
+
const [result, apiCall] = await tenantsList(
|
|
31
27
|
client,
|
|
32
|
-
args.
|
|
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
|
-
|
|
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.
|
|
25
|
+
args.body,
|
|
26
26
|
{ fetchOptions: { signal: ctx.signal } },
|
|
27
27
|
).$inspect();
|
|
28
28
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|