@compose-market/sdk 0.8.34 → 0.8.36
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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/channels.d.ts +1 -4
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/resources/channels.js +0 -12
- package/dist/resources/channels.js.map +1 -1
- package/dist/resources/notifications.d.ts +28 -0
- package/dist/resources/notifications.d.ts.map +1 -0
- package/dist/resources/notifications.js +58 -0
- package/dist/resources/notifications.js.map +1 -0
- package/dist/types/index.d.ts +55 -108
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/generated/channels/esm/lib/config.d.ts +4 -4
- package/generated/channels/esm/lib/config.js +4 -4
- package/generated/channels/esm/models/channel-link-response.d.ts +18 -1
- package/generated/channels/esm/models/channel-link-response.d.ts.map +1 -1
- package/generated/channels/esm/models/channel-link-response.js +20 -2
- package/generated/channels/esm/models/channel-link-response.js.map +1 -1
- package/generated/channels/esm/models/errors/index.d.ts +0 -1
- package/generated/channels/esm/models/errors/index.d.ts.map +1 -1
- package/generated/channels/esm/models/errors/index.js +0 -1
- package/generated/channels/esm/models/errors/index.js.map +1 -1
- package/generated/channels/esm/models/index.d.ts +0 -28
- package/generated/channels/esm/models/index.d.ts.map +1 -1
- package/generated/channels/esm/models/index.js +0 -28
- package/generated/channels/esm/models/index.js.map +1 -1
- package/generated/channels/esm/sdk/channels.d.ts +0 -4
- package/generated/channels/esm/sdk/channels.d.ts.map +1 -1
- package/generated/channels/esm/sdk/channels.js +0 -7
- package/generated/channels/esm/sdk/channels.js.map +1 -1
- package/generated/channels/package.json +2 -2
- package/generated/channels/src/lib/config.ts +4 -4
- package/generated/channels/src/models/channel-link-response.ts +39 -2
- package/generated/channels/src/models/errors/index.ts +0 -1
- package/generated/channels/src/models/index.ts +0 -28
- package/generated/channels/src/sdk/channels.ts +0 -15
- package/generated/inference/esm/lib/config.d.ts +3 -3
- package/generated/inference/esm/lib/config.js +3 -3
- package/generated/inference/package.json +1 -1
- package/generated/inference/src/lib/config.ts +3 -3
- package/generated/manowar/esm/lib/config.d.ts +3 -3
- package/generated/manowar/esm/lib/config.js +3 -3
- package/generated/manowar/package.json +1 -1
- package/generated/manowar/src/lib/config.ts +3 -3
- package/generated/memory/esm/lib/config.d.ts +3 -3
- package/generated/memory/esm/lib/config.js +3 -3
- package/generated/memory/package.json +1 -1
- package/generated/memory/src/lib/config.ts +3 -3
- package/generated/x402/esm/lib/config.d.ts +3 -3
- package/generated/x402/esm/lib/config.js +3 -3
- package/generated/x402/package.json +1 -1
- package/generated/x402/src/lib/config.ts +3 -3
- package/package.json +5 -5
- package/generated/channels/esm/funcs/channels-manage.d.ts +0 -15
- package/generated/channels/esm/funcs/channels-manage.d.ts.map +0 -1
- package/generated/channels/esm/funcs/channels-manage.js +0 -76
- package/generated/channels/esm/funcs/channels-manage.js.map +0 -1
- package/generated/channels/esm/models/action.d.ts +0 -15
- package/generated/channels/esm/models/action.d.ts.map +0 -1
- package/generated/channels/esm/models/action.js +0 -19
- package/generated/channels/esm/models/action.js.map +0 -1
- package/generated/channels/esm/models/availability.d.ts +0 -10
- package/generated/channels/esm/models/availability.d.ts.map +0 -1
- package/generated/channels/esm/models/availability.js +0 -11
- package/generated/channels/esm/models/availability.js.map +0 -1
- package/generated/channels/esm/models/choices.d.ts +0 -17
- package/generated/channels/esm/models/choices.d.ts.map +0 -1
- package/generated/channels/esm/models/choices.js +0 -22
- package/generated/channels/esm/models/choices.js.map +0 -1
- package/generated/channels/esm/models/condition.d.ts +0 -11
- package/generated/channels/esm/models/condition.d.ts.map +0 -1
- package/generated/channels/esm/models/condition.js +0 -12
- package/generated/channels/esm/models/condition.js.map +0 -1
- package/generated/channels/esm/models/connected.d.ts +0 -13
- package/generated/channels/esm/models/connected.d.ts.map +0 -1
- package/generated/channels/esm/models/connected.js +0 -17
- package/generated/channels/esm/models/connected.js.map +0 -1
- package/generated/channels/esm/models/connection.d.ts +0 -18
- package/generated/channels/esm/models/connection.d.ts.map +0 -1
- package/generated/channels/esm/models/connection.js +0 -23
- package/generated/channels/esm/models/connection.js.map +0 -1
- package/generated/channels/esm/models/deletion.d.ts +0 -16
- package/generated/channels/esm/models/deletion.d.ts.map +0 -1
- package/generated/channels/esm/models/deletion.js +0 -14
- package/generated/channels/esm/models/deletion.js.map +0 -1
- package/generated/channels/esm/models/destination.d.ts +0 -21
- package/generated/channels/esm/models/destination.d.ts.map +0 -1
- package/generated/channels/esm/models/destination.js +0 -26
- package/generated/channels/esm/models/destination.js.map +0 -1
- package/generated/channels/esm/models/enumeration.d.ts +0 -16
- package/generated/channels/esm/models/enumeration.d.ts.map +0 -1
- package/generated/channels/esm/models/enumeration.js +0 -14
- package/generated/channels/esm/models/enumeration.js.map +0 -1
- package/generated/channels/esm/models/errors/error.d.ts +0 -18
- package/generated/channels/esm/models/errors/error.d.ts.map +0 -1
- package/generated/channels/esm/models/errors/error.js +0 -34
- package/generated/channels/esm/models/errors/error.js.map +0 -1
- package/generated/channels/esm/models/inspection.d.ts +0 -14
- package/generated/channels/esm/models/inspection.d.ts.map +0 -1
- package/generated/channels/esm/models/inspection.js +0 -13
- package/generated/channels/esm/models/inspection.js.map +0 -1
- package/generated/channels/esm/models/kind.d.ts +0 -11
- package/generated/channels/esm/models/kind.d.ts.map +0 -1
- package/generated/channels/esm/models/kind.js +0 -13
- package/generated/channels/esm/models/kind.js.map +0 -1
- package/generated/channels/esm/models/linkage.d.ts +0 -17
- package/generated/channels/esm/models/linkage.d.ts.map +0 -1
- package/generated/channels/esm/models/linkage.js +0 -15
- package/generated/channels/esm/models/linkage.js.map +0 -1
- package/generated/channels/esm/models/lookup.d.ts +0 -19
- package/generated/channels/esm/models/lookup.d.ts.map +0 -1
- package/generated/channels/esm/models/lookup.js +0 -17
- package/generated/channels/esm/models/lookup.js.map +0 -1
- package/generated/channels/esm/models/managed.d.ts +0 -16
- package/generated/channels/esm/models/managed.d.ts.map +0 -1
- package/generated/channels/esm/models/managed.js +0 -26
- package/generated/channels/esm/models/managed.js.map +0 -1
- package/generated/channels/esm/models/management.d.ts +0 -17
- package/generated/channels/esm/models/management.d.ts.map +0 -1
- package/generated/channels/esm/models/management.js +0 -29
- package/generated/channels/esm/models/management.js.map +0 -1
- package/generated/channels/esm/models/news.d.ts +0 -23
- package/generated/channels/esm/models/news.d.ts.map +0 -1
- package/generated/channels/esm/models/news.js +0 -27
- package/generated/channels/esm/models/news.js.map +0 -1
- package/generated/channels/esm/models/preference.d.ts +0 -27
- package/generated/channels/esm/models/preference.d.ts.map +0 -1
- package/generated/channels/esm/models/preference.js +0 -24
- package/generated/channels/esm/models/preference.js.map +0 -1
- package/generated/channels/esm/models/result.d.ts +0 -10
- package/generated/channels/esm/models/result.d.ts.map +0 -1
- package/generated/channels/esm/models/result.js +0 -14
- package/generated/channels/esm/models/result.js.map +0 -1
- package/generated/channels/esm/models/selection.d.ts +0 -18
- package/generated/channels/esm/models/selection.d.ts.map +0 -1
- package/generated/channels/esm/models/selection.js +0 -15
- package/generated/channels/esm/models/selection.js.map +0 -1
- package/generated/channels/esm/models/sentiment.d.ts +0 -13
- package/generated/channels/esm/models/sentiment.d.ts.map +0 -1
- package/generated/channels/esm/models/sentiment.js +0 -14
- package/generated/channels/esm/models/sentiment.js.map +0 -1
- package/generated/channels/esm/models/signals.d.ts +0 -28
- package/generated/channels/esm/models/signals.d.ts.map +0 -1
- package/generated/channels/esm/models/signals.js +0 -32
- package/generated/channels/esm/models/signals.js.map +0 -1
- package/generated/channels/esm/models/source.d.ts +0 -12
- package/generated/channels/esm/models/source.d.ts.map +0 -1
- package/generated/channels/esm/models/source.js +0 -15
- package/generated/channels/esm/models/source.js.map +0 -1
- package/generated/channels/esm/models/status.d.ts +0 -15
- package/generated/channels/esm/models/status.d.ts.map +0 -1
- package/generated/channels/esm/models/status.js +0 -18
- package/generated/channels/esm/models/status.js.map +0 -1
- package/generated/channels/esm/models/subscribe.d.ts +0 -19
- package/generated/channels/esm/models/subscribe.d.ts.map +0 -1
- package/generated/channels/esm/models/subscribe.js +0 -16
- package/generated/channels/esm/models/subscribe.js.map +0 -1
- package/generated/channels/esm/models/subscription.d.ts +0 -26
- package/generated/channels/esm/models/subscription.d.ts.map +0 -1
- package/generated/channels/esm/models/subscription.js +0 -32
- package/generated/channels/esm/models/subscription.js.map +0 -1
- package/generated/channels/esm/models/toggle.d.ts +0 -18
- package/generated/channels/esm/models/toggle.d.ts.map +0 -1
- package/generated/channels/esm/models/toggle.js +0 -16
- package/generated/channels/esm/models/toggle.js.map +0 -1
- package/generated/channels/esm/models/type.d.ts +0 -11
- package/generated/channels/esm/models/type.d.ts.map +0 -1
- package/generated/channels/esm/models/type.js +0 -13
- package/generated/channels/esm/models/type.js.map +0 -1
- package/generated/channels/esm/models/unlink.d.ts +0 -16
- package/generated/channels/esm/models/unlink.d.ts.map +0 -1
- package/generated/channels/esm/models/unlink.js +0 -15
- package/generated/channels/esm/models/unlink.js.map +0 -1
- package/generated/channels/src/funcs/channels-manage.ts +0 -164
- package/generated/channels/src/models/action.ts +0 -37
- package/generated/channels/src/models/availability.ts +0 -17
- package/generated/channels/src/models/choices.ts +0 -49
- package/generated/channels/src/models/condition.ts +0 -18
- package/generated/channels/src/models/connected.ts +0 -32
- package/generated/channels/src/models/connection.ts +0 -43
- package/generated/channels/src/models/deletion.ts +0 -32
- package/generated/channels/src/models/destination.ts +0 -48
- package/generated/channels/src/models/enumeration.ts +0 -32
- package/generated/channels/src/models/errors/error.ts +0 -49
- package/generated/channels/src/models/inspection.ts +0 -29
- package/generated/channels/src/models/kind.ts +0 -18
- package/generated/channels/src/models/linkage.ts +0 -31
- package/generated/channels/src/models/lookup.ts +0 -34
- package/generated/channels/src/models/managed.ts +0 -46
- package/generated/channels/src/models/management.ts +0 -81
- package/generated/channels/src/models/news.ts +0 -54
- package/generated/channels/src/models/preference.ts +0 -62
- package/generated/channels/src/models/result.ts +0 -28
- package/generated/channels/src/models/selection.ts +0 -35
- package/generated/channels/src/models/sentiment.ts +0 -21
- package/generated/channels/src/models/signals.ts +0 -66
- package/generated/channels/src/models/source.ts +0 -20
- package/generated/channels/src/models/status.ts +0 -34
- package/generated/channels/src/models/subscribe.ts +0 -40
- package/generated/channels/src/models/subscription.ts +0 -69
- package/generated/channels/src/models/toggle.ts +0 -33
- package/generated/channels/src/models/type.ts +0 -18
- package/generated/channels/src/models/unlink.ts +0 -30
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { SDKCore } from "../core.js";
|
|
7
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
8
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
-
import * as M from "../lib/matchers.js";
|
|
10
|
-
import { compactMap } from "../lib/primitives.js";
|
|
11
|
-
import { safeParse } from "../lib/schemas.js";
|
|
12
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
-
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import {
|
|
15
|
-
ConnectionError,
|
|
16
|
-
InvalidRequestError,
|
|
17
|
-
RequestAbortedError,
|
|
18
|
-
RequestTimeoutError,
|
|
19
|
-
UnexpectedClientError,
|
|
20
|
-
} from "../models/errors/http-client-errors.js";
|
|
21
|
-
import * as errors from "../models/errors/index.js";
|
|
22
|
-
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
23
|
-
import { SDKError } from "../models/errors/sdk-error.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
25
|
-
import * as models from "../models/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Manage user-owned channels and notifications without agents
|
|
31
|
-
*/
|
|
32
|
-
export function channelsManage(
|
|
33
|
-
client: SDKCore,
|
|
34
|
-
request: models.Management,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): APIPromise<
|
|
37
|
-
Result<
|
|
38
|
-
models.Managed,
|
|
39
|
-
| errors.ErrorT
|
|
40
|
-
| SDKError
|
|
41
|
-
| ResponseValidationError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| UnexpectedClientError
|
|
47
|
-
| SDKValidationError
|
|
48
|
-
>
|
|
49
|
-
> {
|
|
50
|
-
return new APIPromise($do(
|
|
51
|
-
client,
|
|
52
|
-
request,
|
|
53
|
-
options,
|
|
54
|
-
));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function $do(
|
|
58
|
-
client: SDKCore,
|
|
59
|
-
request: models.Management,
|
|
60
|
-
options?: RequestOptions,
|
|
61
|
-
): Promise<
|
|
62
|
-
[
|
|
63
|
-
Result<
|
|
64
|
-
models.Managed,
|
|
65
|
-
| errors.ErrorT
|
|
66
|
-
| SDKError
|
|
67
|
-
| ResponseValidationError
|
|
68
|
-
| ConnectionError
|
|
69
|
-
| RequestAbortedError
|
|
70
|
-
| RequestTimeoutError
|
|
71
|
-
| InvalidRequestError
|
|
72
|
-
| UnexpectedClientError
|
|
73
|
-
| SDKValidationError
|
|
74
|
-
>,
|
|
75
|
-
APICall,
|
|
76
|
-
]
|
|
77
|
-
> {
|
|
78
|
-
const parsed = safeParse(
|
|
79
|
-
request,
|
|
80
|
-
(value) => z.parse(models.Management$outboundSchema, value),
|
|
81
|
-
"Input validation failed",
|
|
82
|
-
);
|
|
83
|
-
if (!parsed.ok) {
|
|
84
|
-
return [parsed, { status: "invalid" }];
|
|
85
|
-
}
|
|
86
|
-
const payload = parsed.value;
|
|
87
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
88
|
-
|
|
89
|
-
const path = pathToFunc("/channels/manage")();
|
|
90
|
-
|
|
91
|
-
const headers = new Headers(compactMap({
|
|
92
|
-
"Content-Type": "application/json",
|
|
93
|
-
Accept: "application/json",
|
|
94
|
-
}));
|
|
95
|
-
|
|
96
|
-
const context = {
|
|
97
|
-
options: client._options,
|
|
98
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
99
|
-
operationID: "manage",
|
|
100
|
-
oAuth2Scopes: null,
|
|
101
|
-
|
|
102
|
-
resolvedSecurity: null,
|
|
103
|
-
|
|
104
|
-
securitySource: null,
|
|
105
|
-
retryConfig: options?.retries
|
|
106
|
-
|| client._options.retryConfig
|
|
107
|
-
|| { strategy: "none" },
|
|
108
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const requestRes = client._createRequest(context, {
|
|
112
|
-
method: "POST",
|
|
113
|
-
baseURL: options?.serverURL,
|
|
114
|
-
path: path,
|
|
115
|
-
headers: headers,
|
|
116
|
-
body: body,
|
|
117
|
-
userAgent: client._options.userAgent,
|
|
118
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
119
|
-
}, options);
|
|
120
|
-
if (!requestRes.ok) {
|
|
121
|
-
return [requestRes, { status: "invalid" }];
|
|
122
|
-
}
|
|
123
|
-
const req = requestRes.value;
|
|
124
|
-
|
|
125
|
-
const doResult = await client._do(req, {
|
|
126
|
-
context,
|
|
127
|
-
isErrorStatusCode: (statusCode: number) =>
|
|
128
|
-
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
129
|
-
retryConfig: context.retryConfig,
|
|
130
|
-
retryCodes: context.retryCodes,
|
|
131
|
-
});
|
|
132
|
-
if (!doResult.ok) {
|
|
133
|
-
return [doResult, { status: "request-error", request: req }];
|
|
134
|
-
}
|
|
135
|
-
const response = doResult.value;
|
|
136
|
-
|
|
137
|
-
const responseFields = {
|
|
138
|
-
HttpMeta: { Response: response, Request: req },
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
const [result] = await M.match<
|
|
142
|
-
models.Managed,
|
|
143
|
-
| errors.ErrorT
|
|
144
|
-
| SDKError
|
|
145
|
-
| ResponseValidationError
|
|
146
|
-
| ConnectionError
|
|
147
|
-
| RequestAbortedError
|
|
148
|
-
| RequestTimeoutError
|
|
149
|
-
| InvalidRequestError
|
|
150
|
-
| UnexpectedClientError
|
|
151
|
-
| SDKValidationError
|
|
152
|
-
>(
|
|
153
|
-
M.json(200, models.Managed$inboundSchema),
|
|
154
|
-
M.jsonErr(400, errors.ErrorT$inboundSchema),
|
|
155
|
-
M.jsonErr(503, errors.ErrorT$inboundSchema),
|
|
156
|
-
M.fail("4XX"),
|
|
157
|
-
M.fail("5XX"),
|
|
158
|
-
)(response, req, { extraFields: responseFields });
|
|
159
|
-
if (!result.ok) {
|
|
160
|
-
return [result, { status: "complete", request: req, response }];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
return [result, { status: "complete", request: req, response }];
|
|
164
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import * as types from "../types/primitives.js";
|
|
9
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
-
import { Type, Type$inboundSchema } from "./type.js";
|
|
11
|
-
|
|
12
|
-
export type Action = {
|
|
13
|
-
type?: Type | undefined;
|
|
14
|
-
label?: string | undefined;
|
|
15
|
-
url?: string | null | undefined;
|
|
16
|
-
socket?: string | undefined;
|
|
17
|
-
command?: string | undefined;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const Action$inboundSchema: z.ZodMiniType<Action, unknown> = z.object({
|
|
22
|
-
type: types.optional(Type$inboundSchema),
|
|
23
|
-
label: types.optional(types.string()),
|
|
24
|
-
url: z.optional(z.nullable(types.string())),
|
|
25
|
-
socket: types.optional(types.string()),
|
|
26
|
-
command: types.optional(types.string()),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export function actionFromJSON(
|
|
30
|
-
jsonString: string,
|
|
31
|
-
): SafeParseResult<Action, SDKValidationError> {
|
|
32
|
-
return safeParse(
|
|
33
|
-
jsonString,
|
|
34
|
-
(x) => Action$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
-
`Failed to parse 'Action' from JSON`,
|
|
36
|
-
);
|
|
37
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import * as openEnums from "../types/enums.js";
|
|
7
|
-
import { OpenEnum } from "../types/enums.js";
|
|
8
|
-
|
|
9
|
-
export const Availability = {
|
|
10
|
-
Connected: "connected",
|
|
11
|
-
Disconnected: "disconnected",
|
|
12
|
-
} as const;
|
|
13
|
-
export type Availability = OpenEnum<typeof Availability>;
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const Availability$inboundSchema: z.ZodMiniType<Availability, unknown> =
|
|
17
|
-
openEnums.inboundSchema(Availability);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import * as types from "../types/primitives.js";
|
|
9
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
-
|
|
11
|
-
export type Choice = {
|
|
12
|
-
id: string;
|
|
13
|
-
label: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type Choices = {
|
|
17
|
-
choices: Array<Choice>;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const Choice$inboundSchema: z.ZodMiniType<Choice, unknown> = z.object({
|
|
22
|
-
id: types.string(),
|
|
23
|
-
label: types.string(),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export function choiceFromJSON(
|
|
27
|
-
jsonString: string,
|
|
28
|
-
): SafeParseResult<Choice, SDKValidationError> {
|
|
29
|
-
return safeParse(
|
|
30
|
-
jsonString,
|
|
31
|
-
(x) => Choice$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
-
`Failed to parse 'Choice' from JSON`,
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const Choices$inboundSchema: z.ZodMiniType<Choices, unknown> = z.object({
|
|
38
|
-
choices: z.array(z.lazy(() => Choice$inboundSchema)),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export function choicesFromJSON(
|
|
42
|
-
jsonString: string,
|
|
43
|
-
): SafeParseResult<Choices, SDKValidationError> {
|
|
44
|
-
return safeParse(
|
|
45
|
-
jsonString,
|
|
46
|
-
(x) => Choices$inboundSchema.parse(JSON.parse(x)),
|
|
47
|
-
`Failed to parse 'Choices' from JSON`,
|
|
48
|
-
);
|
|
49
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import * as openEnums from "../types/enums.js";
|
|
7
|
-
import { OpenEnum } from "../types/enums.js";
|
|
8
|
-
|
|
9
|
-
export const Condition = {
|
|
10
|
-
Pending: "pending",
|
|
11
|
-
Connected: "connected",
|
|
12
|
-
Disconnected: "disconnected",
|
|
13
|
-
} as const;
|
|
14
|
-
export type Condition = OpenEnum<typeof Condition>;
|
|
15
|
-
|
|
16
|
-
/** @internal */
|
|
17
|
-
export const Condition$inboundSchema: z.ZodMiniType<Condition, unknown> =
|
|
18
|
-
openEnums.inboundSchema(Condition);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import { Action, Action$inboundSchema } from "./action.js";
|
|
9
|
-
import { Connection, Connection$inboundSchema } from "./connection.js";
|
|
10
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
-
|
|
12
|
-
export type Connected = {
|
|
13
|
-
connection: Connection;
|
|
14
|
-
action: Action;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const Connected$inboundSchema: z.ZodMiniType<Connected, unknown> = z
|
|
19
|
-
.object({
|
|
20
|
-
connection: Connection$inboundSchema,
|
|
21
|
-
action: Action$inboundSchema,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export function connectedFromJSON(
|
|
25
|
-
jsonString: string,
|
|
26
|
-
): SafeParseResult<Connected, SDKValidationError> {
|
|
27
|
-
return safeParse(
|
|
28
|
-
jsonString,
|
|
29
|
-
(x) => Connected$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
-
`Failed to parse 'Connected' from JSON`,
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import * as types from "../types/primitives.js";
|
|
9
|
-
import { ChannelName, ChannelName$inboundSchema } from "./channel-name.js";
|
|
10
|
-
import { Condition, Condition$inboundSchema } from "./condition.js";
|
|
11
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
-
|
|
13
|
-
export type Connection = {
|
|
14
|
-
id: string;
|
|
15
|
-
userAddress: string;
|
|
16
|
-
channel: ChannelName;
|
|
17
|
-
status: Condition;
|
|
18
|
-
accountId?: string | undefined;
|
|
19
|
-
installation?: string | undefined;
|
|
20
|
-
createdAt: number;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const Connection$inboundSchema: z.ZodMiniType<Connection, unknown> = z
|
|
25
|
-
.object({
|
|
26
|
-
id: types.string(),
|
|
27
|
-
userAddress: types.string(),
|
|
28
|
-
channel: ChannelName$inboundSchema,
|
|
29
|
-
status: Condition$inboundSchema,
|
|
30
|
-
accountId: types.optional(types.string()),
|
|
31
|
-
installation: types.optional(types.string()),
|
|
32
|
-
createdAt: types.number(),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export function connectionFromJSON(
|
|
36
|
-
jsonString: string,
|
|
37
|
-
): SafeParseResult<Connection, SDKValidationError> {
|
|
38
|
-
return safeParse(
|
|
39
|
-
jsonString,
|
|
40
|
-
(x) => Connection$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
-
`Failed to parse 'Connection' from JSON`,
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
|
|
7
|
-
export type Deletion = {
|
|
8
|
-
userAddress: string;
|
|
9
|
-
operation: "delete";
|
|
10
|
-
id: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/** @internal */
|
|
14
|
-
export type Deletion$Outbound = {
|
|
15
|
-
userAddress: string;
|
|
16
|
-
operation: "delete";
|
|
17
|
-
id: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const Deletion$outboundSchema: z.ZodMiniType<
|
|
22
|
-
Deletion$Outbound,
|
|
23
|
-
Deletion
|
|
24
|
-
> = z.object({
|
|
25
|
-
userAddress: z.string(),
|
|
26
|
-
operation: z.literal("delete"),
|
|
27
|
-
id: z.string(),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export function deletionToJSON(deletion: Deletion): string {
|
|
31
|
-
return JSON.stringify(Deletion$outboundSchema.parse(deletion));
|
|
32
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import * as types from "../types/primitives.js";
|
|
9
|
-
import { Availability, Availability$inboundSchema } from "./availability.js";
|
|
10
|
-
import { ChannelName, ChannelName$inboundSchema } from "./channel-name.js";
|
|
11
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
-
import { Kind, Kind$inboundSchema } from "./kind.js";
|
|
13
|
-
|
|
14
|
-
export type Destination = {
|
|
15
|
-
id: string;
|
|
16
|
-
connectionId: string;
|
|
17
|
-
userAddress: string;
|
|
18
|
-
channel: ChannelName;
|
|
19
|
-
accountId: string;
|
|
20
|
-
threadId: string;
|
|
21
|
-
kind: Kind;
|
|
22
|
-
label?: string | undefined;
|
|
23
|
-
status: Availability;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export const Destination$inboundSchema: z.ZodMiniType<Destination, unknown> = z
|
|
28
|
-
.object({
|
|
29
|
-
id: types.string(),
|
|
30
|
-
connectionId: types.string(),
|
|
31
|
-
userAddress: types.string(),
|
|
32
|
-
channel: ChannelName$inboundSchema,
|
|
33
|
-
accountId: types.string(),
|
|
34
|
-
threadId: types.string(),
|
|
35
|
-
kind: Kind$inboundSchema,
|
|
36
|
-
label: types.optional(types.string()),
|
|
37
|
-
status: Availability$inboundSchema,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export function destinationFromJSON(
|
|
41
|
-
jsonString: string,
|
|
42
|
-
): SafeParseResult<Destination, SDKValidationError> {
|
|
43
|
-
return safeParse(
|
|
44
|
-
jsonString,
|
|
45
|
-
(x) => Destination$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
-
`Failed to parse 'Destination' from JSON`,
|
|
47
|
-
);
|
|
48
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
|
|
7
|
-
export type Enumeration = {
|
|
8
|
-
userAddress: string;
|
|
9
|
-
operation: "destinations";
|
|
10
|
-
connectionId: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/** @internal */
|
|
14
|
-
export type Enumeration$Outbound = {
|
|
15
|
-
userAddress: string;
|
|
16
|
-
operation: "destinations";
|
|
17
|
-
connectionId: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const Enumeration$outboundSchema: z.ZodMiniType<
|
|
22
|
-
Enumeration$Outbound,
|
|
23
|
-
Enumeration
|
|
24
|
-
> = z.object({
|
|
25
|
-
userAddress: z.string(),
|
|
26
|
-
operation: z.literal("destinations"),
|
|
27
|
-
connectionId: z.string(),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export function enumerationToJSON(enumeration: Enumeration): string {
|
|
31
|
-
return JSON.stringify(Enumeration$outboundSchema.parse(enumeration));
|
|
32
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import * as types from "../../types/primitives.js";
|
|
7
|
-
import { SDKError } from "./sdk-error.js";
|
|
8
|
-
|
|
9
|
-
export type ErrorTData = {
|
|
10
|
-
error: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export class ErrorT extends SDKError {
|
|
14
|
-
error: string;
|
|
15
|
-
|
|
16
|
-
/** The original data that was passed to this error instance. */
|
|
17
|
-
data$: ErrorTData;
|
|
18
|
-
|
|
19
|
-
constructor(
|
|
20
|
-
err: ErrorTData,
|
|
21
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
22
|
-
) {
|
|
23
|
-
const message = "message" in err && typeof err.message === "string"
|
|
24
|
-
? err.message
|
|
25
|
-
: `API error occurred: ${JSON.stringify(err)}`;
|
|
26
|
-
super(message, httpMeta);
|
|
27
|
-
this.data$ = err;
|
|
28
|
-
this.error = err.error;
|
|
29
|
-
|
|
30
|
-
this.name = "ErrorT";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const ErrorT$inboundSchema: z.ZodMiniType<ErrorT, unknown> = z.pipe(
|
|
36
|
-
z.object({
|
|
37
|
-
error: types.string(),
|
|
38
|
-
request$: z.custom<Request>(x => x instanceof Request),
|
|
39
|
-
response$: z.custom<Response>(x => x instanceof Response),
|
|
40
|
-
body$: z.string(),
|
|
41
|
-
}),
|
|
42
|
-
z.transform((v) => {
|
|
43
|
-
return new ErrorT(v, {
|
|
44
|
-
request: v.request$,
|
|
45
|
-
response: v.response$,
|
|
46
|
-
body: v.body$,
|
|
47
|
-
});
|
|
48
|
-
}),
|
|
49
|
-
);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
|
|
7
|
-
export type Inspection = {
|
|
8
|
-
userAddress: string;
|
|
9
|
-
operation: "status";
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/** @internal */
|
|
13
|
-
export type Inspection$Outbound = {
|
|
14
|
-
userAddress: string;
|
|
15
|
-
operation: "status";
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/** @internal */
|
|
19
|
-
export const Inspection$outboundSchema: z.ZodMiniType<
|
|
20
|
-
Inspection$Outbound,
|
|
21
|
-
Inspection
|
|
22
|
-
> = z.object({
|
|
23
|
-
userAddress: z.string(),
|
|
24
|
-
operation: z.literal("status"),
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export function inspectionToJSON(inspection: Inspection): string {
|
|
28
|
-
return JSON.stringify(Inspection$outboundSchema.parse(inspection));
|
|
29
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import * as openEnums from "../types/enums.js";
|
|
7
|
-
import { OpenEnum } from "../types/enums.js";
|
|
8
|
-
|
|
9
|
-
export const Kind = {
|
|
10
|
-
Dm: "dm",
|
|
11
|
-
Channel: "channel",
|
|
12
|
-
Thread: "thread",
|
|
13
|
-
} as const;
|
|
14
|
-
export type Kind = OpenEnum<typeof Kind>;
|
|
15
|
-
|
|
16
|
-
/** @internal */
|
|
17
|
-
export const Kind$inboundSchema: z.ZodMiniType<Kind, unknown> = openEnums
|
|
18
|
-
.inboundSchema(Kind);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { ChannelName, ChannelName$outboundSchema } from "./channel-name.js";
|
|
7
|
-
|
|
8
|
-
export type Linkage = {
|
|
9
|
-
userAddress: string;
|
|
10
|
-
operation: "connect";
|
|
11
|
-
channel: ChannelName;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/** @internal */
|
|
15
|
-
export type Linkage$Outbound = {
|
|
16
|
-
userAddress: string;
|
|
17
|
-
operation: "connect";
|
|
18
|
-
channel: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @internal */
|
|
22
|
-
export const Linkage$outboundSchema: z.ZodMiniType<Linkage$Outbound, Linkage> =
|
|
23
|
-
z.object({
|
|
24
|
-
userAddress: z.string(),
|
|
25
|
-
operation: z.literal("connect"),
|
|
26
|
-
channel: ChannelName$outboundSchema,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export function linkageToJSON(linkage: Linkage): string {
|
|
30
|
-
return JSON.stringify(Linkage$outboundSchema.parse(linkage));
|
|
31
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { Source, Source$outboundSchema } from "./source.js";
|
|
7
|
-
|
|
8
|
-
export type Lookup = {
|
|
9
|
-
userAddress: string;
|
|
10
|
-
operation: "lookup";
|
|
11
|
-
source: Source;
|
|
12
|
-
search?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export type Lookup$Outbound = {
|
|
17
|
-
userAddress: string;
|
|
18
|
-
operation: "lookup";
|
|
19
|
-
source: string;
|
|
20
|
-
search?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const Lookup$outboundSchema: z.ZodMiniType<Lookup$Outbound, Lookup> = z
|
|
25
|
-
.object({
|
|
26
|
-
userAddress: z.string(),
|
|
27
|
-
operation: z.literal("lookup"),
|
|
28
|
-
source: Source$outboundSchema,
|
|
29
|
-
search: z.optional(z.string()),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export function lookupToJSON(lookup: Lookup): string {
|
|
33
|
-
return JSON.stringify(Lookup$outboundSchema.parse(lookup));
|
|
34
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import { smartUnion } from "../types/smart-union.js";
|
|
9
|
-
import { Choices, Choices$inboundSchema } from "./choices.js";
|
|
10
|
-
import { Connected, Connected$inboundSchema } from "./connected.js";
|
|
11
|
-
import { Destination, Destination$inboundSchema } from "./destination.js";
|
|
12
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
13
|
-
import { Result, Result$inboundSchema } from "./result.js";
|
|
14
|
-
import { Status, Status$inboundSchema } from "./status.js";
|
|
15
|
-
import { Subscription, Subscription$inboundSchema } from "./subscription.js";
|
|
16
|
-
|
|
17
|
-
export type Managed =
|
|
18
|
-
| Subscription
|
|
19
|
-
| Destination
|
|
20
|
-
| Status
|
|
21
|
-
| Connected
|
|
22
|
-
| Result
|
|
23
|
-
| Choices
|
|
24
|
-
| { [k: string]: Array<any> };
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export const Managed$inboundSchema: z.ZodMiniType<Managed, unknown> =
|
|
28
|
-
smartUnion([
|
|
29
|
-
Subscription$inboundSchema,
|
|
30
|
-
Destination$inboundSchema,
|
|
31
|
-
Status$inboundSchema,
|
|
32
|
-
Connected$inboundSchema,
|
|
33
|
-
Result$inboundSchema,
|
|
34
|
-
Choices$inboundSchema,
|
|
35
|
-
z.record(z.string(), z.array(z.any())),
|
|
36
|
-
]);
|
|
37
|
-
|
|
38
|
-
export function managedFromJSON(
|
|
39
|
-
jsonString: string,
|
|
40
|
-
): SafeParseResult<Managed, SDKValidationError> {
|
|
41
|
-
return safeParse(
|
|
42
|
-
jsonString,
|
|
43
|
-
(x) => Managed$inboundSchema.parse(JSON.parse(x)),
|
|
44
|
-
`Failed to parse 'Managed' from JSON`,
|
|
45
|
-
);
|
|
46
|
-
}
|