@compose-market/sdk 0.8.33 → 0.8.34
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/resources/channels.d.ts +4 -1
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/resources/channels.js +12 -0
- package/dist/resources/channels.js.map +1 -1
- package/dist/types/index.d.ts +108 -0
- 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/funcs/channels-manage.d.ts +15 -0
- package/generated/channels/esm/funcs/channels-manage.d.ts.map +1 -0
- package/generated/channels/esm/funcs/channels-manage.js +76 -0
- package/generated/channels/esm/funcs/channels-manage.js.map +1 -0
- package/generated/channels/esm/lib/config.d.ts +4 -4
- package/generated/channels/esm/lib/config.js +4 -4
- package/generated/channels/esm/models/action.d.ts +15 -0
- package/generated/channels/esm/models/action.d.ts.map +1 -0
- package/generated/channels/esm/models/action.js +19 -0
- package/generated/channels/esm/models/action.js.map +1 -0
- package/generated/channels/esm/models/availability.d.ts +10 -0
- package/generated/channels/esm/models/availability.d.ts.map +1 -0
- package/generated/channels/esm/models/availability.js +11 -0
- package/generated/channels/esm/models/availability.js.map +1 -0
- package/generated/channels/esm/models/channel-link-response.d.ts +1 -18
- package/generated/channels/esm/models/channel-link-response.d.ts.map +1 -1
- package/generated/channels/esm/models/channel-link-response.js +2 -20
- package/generated/channels/esm/models/channel-link-response.js.map +1 -1
- package/generated/channels/esm/models/choices.d.ts +17 -0
- package/generated/channels/esm/models/choices.d.ts.map +1 -0
- package/generated/channels/esm/models/choices.js +22 -0
- package/generated/channels/esm/models/choices.js.map +1 -0
- package/generated/channels/esm/models/condition.d.ts +11 -0
- package/generated/channels/esm/models/condition.d.ts.map +1 -0
- package/generated/channels/esm/models/condition.js +12 -0
- package/generated/channels/esm/models/condition.js.map +1 -0
- package/generated/channels/esm/models/connected.d.ts +13 -0
- package/generated/channels/esm/models/connected.d.ts.map +1 -0
- package/generated/channels/esm/models/connected.js +17 -0
- package/generated/channels/esm/models/connected.js.map +1 -0
- package/generated/channels/esm/models/connection.d.ts +18 -0
- package/generated/channels/esm/models/connection.d.ts.map +1 -0
- package/generated/channels/esm/models/connection.js +23 -0
- package/generated/channels/esm/models/connection.js.map +1 -0
- package/generated/channels/esm/models/deletion.d.ts +16 -0
- package/generated/channels/esm/models/deletion.d.ts.map +1 -0
- package/generated/channels/esm/models/deletion.js +14 -0
- package/generated/channels/esm/models/deletion.js.map +1 -0
- package/generated/channels/esm/models/destination.d.ts +21 -0
- package/generated/channels/esm/models/destination.d.ts.map +1 -0
- package/generated/channels/esm/models/destination.js +26 -0
- package/generated/channels/esm/models/destination.js.map +1 -0
- package/generated/channels/esm/models/enumeration.d.ts +16 -0
- package/generated/channels/esm/models/enumeration.d.ts.map +1 -0
- package/generated/channels/esm/models/enumeration.js +14 -0
- package/generated/channels/esm/models/enumeration.js.map +1 -0
- package/generated/channels/esm/models/errors/error.d.ts +18 -0
- package/generated/channels/esm/models/errors/error.d.ts.map +1 -0
- package/generated/channels/esm/models/errors/error.js +34 -0
- package/generated/channels/esm/models/errors/error.js.map +1 -0
- package/generated/channels/esm/models/errors/index.d.ts +1 -0
- package/generated/channels/esm/models/errors/index.d.ts.map +1 -1
- package/generated/channels/esm/models/errors/index.js +1 -0
- package/generated/channels/esm/models/errors/index.js.map +1 -1
- package/generated/channels/esm/models/index.d.ts +28 -0
- package/generated/channels/esm/models/index.d.ts.map +1 -1
- package/generated/channels/esm/models/index.js +28 -0
- package/generated/channels/esm/models/index.js.map +1 -1
- package/generated/channels/esm/models/inspection.d.ts +14 -0
- package/generated/channels/esm/models/inspection.d.ts.map +1 -0
- package/generated/channels/esm/models/inspection.js +13 -0
- package/generated/channels/esm/models/inspection.js.map +1 -0
- package/generated/channels/esm/models/kind.d.ts +11 -0
- package/generated/channels/esm/models/kind.d.ts.map +1 -0
- package/generated/channels/esm/models/kind.js +13 -0
- package/generated/channels/esm/models/kind.js.map +1 -0
- package/generated/channels/esm/models/linkage.d.ts +17 -0
- package/generated/channels/esm/models/linkage.d.ts.map +1 -0
- package/generated/channels/esm/models/linkage.js +15 -0
- package/generated/channels/esm/models/linkage.js.map +1 -0
- package/generated/channels/esm/models/lookup.d.ts +19 -0
- package/generated/channels/esm/models/lookup.d.ts.map +1 -0
- package/generated/channels/esm/models/lookup.js +17 -0
- package/generated/channels/esm/models/lookup.js.map +1 -0
- package/generated/channels/esm/models/managed.d.ts +16 -0
- package/generated/channels/esm/models/managed.d.ts.map +1 -0
- package/generated/channels/esm/models/managed.js +26 -0
- package/generated/channels/esm/models/managed.js.map +1 -0
- package/generated/channels/esm/models/management.d.ts +17 -0
- package/generated/channels/esm/models/management.d.ts.map +1 -0
- package/generated/channels/esm/models/management.js +29 -0
- package/generated/channels/esm/models/management.js.map +1 -0
- package/generated/channels/esm/models/news.d.ts +23 -0
- package/generated/channels/esm/models/news.d.ts.map +1 -0
- package/generated/channels/esm/models/news.js +27 -0
- package/generated/channels/esm/models/news.js.map +1 -0
- package/generated/channels/esm/models/preference.d.ts +27 -0
- package/generated/channels/esm/models/preference.d.ts.map +1 -0
- package/generated/channels/esm/models/preference.js +24 -0
- package/generated/channels/esm/models/preference.js.map +1 -0
- package/generated/channels/esm/models/result.d.ts +10 -0
- package/generated/channels/esm/models/result.d.ts.map +1 -0
- package/generated/channels/esm/models/result.js +14 -0
- package/generated/channels/esm/models/result.js.map +1 -0
- package/generated/channels/esm/models/selection.d.ts +18 -0
- package/generated/channels/esm/models/selection.d.ts.map +1 -0
- package/generated/channels/esm/models/selection.js +15 -0
- package/generated/channels/esm/models/selection.js.map +1 -0
- package/generated/channels/esm/models/sentiment.d.ts +13 -0
- package/generated/channels/esm/models/sentiment.d.ts.map +1 -0
- package/generated/channels/esm/models/sentiment.js +14 -0
- package/generated/channels/esm/models/sentiment.js.map +1 -0
- package/generated/channels/esm/models/signals.d.ts +28 -0
- package/generated/channels/esm/models/signals.d.ts.map +1 -0
- package/generated/channels/esm/models/signals.js +32 -0
- package/generated/channels/esm/models/signals.js.map +1 -0
- package/generated/channels/esm/models/source.d.ts +12 -0
- package/generated/channels/esm/models/source.d.ts.map +1 -0
- package/generated/channels/esm/models/source.js +15 -0
- package/generated/channels/esm/models/source.js.map +1 -0
- package/generated/channels/esm/models/status.d.ts +15 -0
- package/generated/channels/esm/models/status.d.ts.map +1 -0
- package/generated/channels/esm/models/status.js +18 -0
- package/generated/channels/esm/models/status.js.map +1 -0
- package/generated/channels/esm/models/subscribe.d.ts +19 -0
- package/generated/channels/esm/models/subscribe.d.ts.map +1 -0
- package/generated/channels/esm/models/subscribe.js +16 -0
- package/generated/channels/esm/models/subscribe.js.map +1 -0
- package/generated/channels/esm/models/subscription.d.ts +26 -0
- package/generated/channels/esm/models/subscription.d.ts.map +1 -0
- package/generated/channels/esm/models/subscription.js +32 -0
- package/generated/channels/esm/models/subscription.js.map +1 -0
- package/generated/channels/esm/models/toggle.d.ts +18 -0
- package/generated/channels/esm/models/toggle.d.ts.map +1 -0
- package/generated/channels/esm/models/toggle.js +16 -0
- package/generated/channels/esm/models/toggle.js.map +1 -0
- package/generated/channels/esm/models/type.d.ts +11 -0
- package/generated/channels/esm/models/type.d.ts.map +1 -0
- package/generated/channels/esm/models/type.js +13 -0
- package/generated/channels/esm/models/type.js.map +1 -0
- package/generated/channels/esm/models/unlink.d.ts +16 -0
- package/generated/channels/esm/models/unlink.d.ts.map +1 -0
- package/generated/channels/esm/models/unlink.js +15 -0
- package/generated/channels/esm/models/unlink.js.map +1 -0
- package/generated/channels/esm/sdk/channels.d.ts +4 -0
- package/generated/channels/esm/sdk/channels.d.ts.map +1 -1
- package/generated/channels/esm/sdk/channels.js +7 -0
- package/generated/channels/esm/sdk/channels.js.map +1 -1
- package/generated/channels/package.json +2 -2
- package/generated/channels/src/funcs/channels-manage.ts +164 -0
- package/generated/channels/src/lib/config.ts +4 -4
- package/generated/channels/src/models/action.ts +37 -0
- package/generated/channels/src/models/availability.ts +17 -0
- package/generated/channels/src/models/channel-link-response.ts +2 -39
- package/generated/channels/src/models/choices.ts +49 -0
- package/generated/channels/src/models/condition.ts +18 -0
- package/generated/channels/src/models/connected.ts +32 -0
- package/generated/channels/src/models/connection.ts +43 -0
- package/generated/channels/src/models/deletion.ts +32 -0
- package/generated/channels/src/models/destination.ts +48 -0
- package/generated/channels/src/models/enumeration.ts +32 -0
- package/generated/channels/src/models/errors/error.ts +49 -0
- package/generated/channels/src/models/errors/index.ts +1 -0
- package/generated/channels/src/models/index.ts +28 -0
- package/generated/channels/src/models/inspection.ts +29 -0
- package/generated/channels/src/models/kind.ts +18 -0
- package/generated/channels/src/models/linkage.ts +31 -0
- package/generated/channels/src/models/lookup.ts +34 -0
- package/generated/channels/src/models/managed.ts +46 -0
- package/generated/channels/src/models/management.ts +81 -0
- package/generated/channels/src/models/news.ts +54 -0
- package/generated/channels/src/models/preference.ts +62 -0
- package/generated/channels/src/models/result.ts +28 -0
- package/generated/channels/src/models/selection.ts +35 -0
- package/generated/channels/src/models/sentiment.ts +21 -0
- package/generated/channels/src/models/signals.ts +66 -0
- package/generated/channels/src/models/source.ts +20 -0
- package/generated/channels/src/models/status.ts +34 -0
- package/generated/channels/src/models/subscribe.ts +40 -0
- package/generated/channels/src/models/subscription.ts +69 -0
- package/generated/channels/src/models/toggle.ts +33 -0
- package/generated/channels/src/models/type.ts +18 -0
- package/generated/channels/src/models/unlink.ts +30 -0
- package/generated/channels/src/sdk/channels.ts +15 -0
- 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 +9 -9
|
@@ -8,6 +8,7 @@ import * as openEnums from "../types/enums.js";
|
|
|
8
8
|
import { OpenEnum } from "../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
10
|
import * as types from "../types/primitives.js";
|
|
11
|
+
import { Action, Action$inboundSchema } from "./action.js";
|
|
11
12
|
import { ChannelName, ChannelName$inboundSchema } from "./channel-name.js";
|
|
12
13
|
import { ChannelScope, ChannelScope$inboundSchema } from "./channel-scope.js";
|
|
13
14
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
@@ -26,21 +27,6 @@ export type ChannelLinkResponsePrivacy = OpenEnum<
|
|
|
26
27
|
typeof ChannelLinkResponsePrivacy
|
|
27
28
|
>;
|
|
28
29
|
|
|
29
|
-
export const Type = {
|
|
30
|
-
Redirect: "redirect",
|
|
31
|
-
Websocket: "websocket",
|
|
32
|
-
Oauth: "oauth",
|
|
33
|
-
} as const;
|
|
34
|
-
export type Type = OpenEnum<typeof Type>;
|
|
35
|
-
|
|
36
|
-
export type Action = {
|
|
37
|
-
type?: Type | undefined;
|
|
38
|
-
label?: string | undefined;
|
|
39
|
-
url?: string | null | undefined;
|
|
40
|
-
socket?: string | undefined;
|
|
41
|
-
command?: string | undefined;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
30
|
export type ChannelLinkResponse = {
|
|
45
31
|
/**
|
|
46
32
|
* Short-lived linking code (10 min TTL)
|
|
@@ -84,29 +70,6 @@ export const ChannelLinkResponsePrivacy$inboundSchema: z.ZodMiniType<
|
|
|
84
70
|
unknown
|
|
85
71
|
> = openEnums.inboundSchema(ChannelLinkResponsePrivacy);
|
|
86
72
|
|
|
87
|
-
/** @internal */
|
|
88
|
-
export const Type$inboundSchema: z.ZodMiniType<Type, unknown> = openEnums
|
|
89
|
-
.inboundSchema(Type);
|
|
90
|
-
|
|
91
|
-
/** @internal */
|
|
92
|
-
export const Action$inboundSchema: z.ZodMiniType<Action, unknown> = z.object({
|
|
93
|
-
type: types.optional(Type$inboundSchema),
|
|
94
|
-
label: types.optional(types.string()),
|
|
95
|
-
url: z.optional(z.nullable(types.string())),
|
|
96
|
-
socket: types.optional(types.string()),
|
|
97
|
-
command: types.optional(types.string()),
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
export function actionFromJSON(
|
|
101
|
-
jsonString: string,
|
|
102
|
-
): SafeParseResult<Action, SDKValidationError> {
|
|
103
|
-
return safeParse(
|
|
104
|
-
jsonString,
|
|
105
|
-
(x) => Action$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
-
`Failed to parse 'Action' from JSON`,
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
73
|
/** @internal */
|
|
111
74
|
export const ChannelLinkResponse$inboundSchema: z.ZodMiniType<
|
|
112
75
|
ChannelLinkResponse,
|
|
@@ -124,7 +87,7 @@ export const ChannelLinkResponse$inboundSchema: z.ZodMiniType<
|
|
|
124
87
|
createdAt: types.number(),
|
|
125
88
|
expiresAt: types.number(),
|
|
126
89
|
url: z.optional(z.nullable(types.string())),
|
|
127
|
-
action: types.optional(
|
|
90
|
+
action: types.optional(Action$inboundSchema),
|
|
128
91
|
});
|
|
129
92
|
|
|
130
93
|
export function channelLinkResponseFromJSON(
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
);
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./action.js";
|
|
6
|
+
export * from "./availability.js";
|
|
5
7
|
export * from "./channel-disconnect-request.js";
|
|
6
8
|
export * from "./channel-disconnect-response.js";
|
|
7
9
|
export * from "./channel-get-response.js";
|
|
@@ -12,3 +14,29 @@ export * from "./channel-name.js";
|
|
|
12
14
|
export * from "./channel-route.js";
|
|
13
15
|
export * from "./channel-scope.js";
|
|
14
16
|
export * from "./channel-status-response.js";
|
|
17
|
+
export * from "./choices.js";
|
|
18
|
+
export * from "./condition.js";
|
|
19
|
+
export * from "./connected.js";
|
|
20
|
+
export * from "./connection.js";
|
|
21
|
+
export * from "./deletion.js";
|
|
22
|
+
export * from "./destination.js";
|
|
23
|
+
export * from "./enumeration.js";
|
|
24
|
+
export * from "./inspection.js";
|
|
25
|
+
export * from "./kind.js";
|
|
26
|
+
export * from "./linkage.js";
|
|
27
|
+
export * from "./lookup.js";
|
|
28
|
+
export * from "./managed.js";
|
|
29
|
+
export * from "./management.js";
|
|
30
|
+
export * from "./news.js";
|
|
31
|
+
export * from "./preference.js";
|
|
32
|
+
export * from "./result.js";
|
|
33
|
+
export * from "./selection.js";
|
|
34
|
+
export * from "./sentiment.js";
|
|
35
|
+
export * from "./signals.js";
|
|
36
|
+
export * from "./source.js";
|
|
37
|
+
export * from "./status.js";
|
|
38
|
+
export * from "./subscribe.js";
|
|
39
|
+
export * from "./subscription.js";
|
|
40
|
+
export * from "./toggle.js";
|
|
41
|
+
export * from "./type.js";
|
|
42
|
+
export * from "./unlink.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import {
|
|
7
|
+
Deletion,
|
|
8
|
+
Deletion$Outbound,
|
|
9
|
+
Deletion$outboundSchema,
|
|
10
|
+
} from "./deletion.js";
|
|
11
|
+
import {
|
|
12
|
+
Enumeration,
|
|
13
|
+
Enumeration$Outbound,
|
|
14
|
+
Enumeration$outboundSchema,
|
|
15
|
+
} from "./enumeration.js";
|
|
16
|
+
import {
|
|
17
|
+
Inspection,
|
|
18
|
+
Inspection$Outbound,
|
|
19
|
+
Inspection$outboundSchema,
|
|
20
|
+
} from "./inspection.js";
|
|
21
|
+
import {
|
|
22
|
+
Linkage,
|
|
23
|
+
Linkage$Outbound,
|
|
24
|
+
Linkage$outboundSchema,
|
|
25
|
+
} from "./linkage.js";
|
|
26
|
+
import { Lookup, Lookup$Outbound, Lookup$outboundSchema } from "./lookup.js";
|
|
27
|
+
import {
|
|
28
|
+
Selection,
|
|
29
|
+
Selection$Outbound,
|
|
30
|
+
Selection$outboundSchema,
|
|
31
|
+
} from "./selection.js";
|
|
32
|
+
import {
|
|
33
|
+
Subscribe,
|
|
34
|
+
Subscribe$Outbound,
|
|
35
|
+
Subscribe$outboundSchema,
|
|
36
|
+
} from "./subscribe.js";
|
|
37
|
+
import { Toggle, Toggle$Outbound, Toggle$outboundSchema } from "./toggle.js";
|
|
38
|
+
import { Unlink, Unlink$Outbound, Unlink$outboundSchema } from "./unlink.js";
|
|
39
|
+
|
|
40
|
+
export type Management =
|
|
41
|
+
| Inspection
|
|
42
|
+
| Linkage
|
|
43
|
+
| Unlink
|
|
44
|
+
| Enumeration
|
|
45
|
+
| Selection
|
|
46
|
+
| Lookup
|
|
47
|
+
| Subscribe
|
|
48
|
+
| Toggle
|
|
49
|
+
| Deletion;
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type Management$Outbound =
|
|
53
|
+
| Inspection$Outbound
|
|
54
|
+
| Linkage$Outbound
|
|
55
|
+
| Unlink$Outbound
|
|
56
|
+
| Enumeration$Outbound
|
|
57
|
+
| Selection$Outbound
|
|
58
|
+
| Lookup$Outbound
|
|
59
|
+
| Subscribe$Outbound
|
|
60
|
+
| Toggle$Outbound
|
|
61
|
+
| Deletion$Outbound;
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const Management$outboundSchema: z.ZodMiniType<
|
|
65
|
+
Management$Outbound,
|
|
66
|
+
Management
|
|
67
|
+
> = z.union([
|
|
68
|
+
Inspection$outboundSchema,
|
|
69
|
+
Linkage$outboundSchema,
|
|
70
|
+
Unlink$outboundSchema,
|
|
71
|
+
Enumeration$outboundSchema,
|
|
72
|
+
Selection$outboundSchema,
|
|
73
|
+
Lookup$outboundSchema,
|
|
74
|
+
Subscribe$outboundSchema,
|
|
75
|
+
Toggle$outboundSchema,
|
|
76
|
+
Deletion$outboundSchema,
|
|
77
|
+
]);
|
|
78
|
+
|
|
79
|
+
export function managementToJSON(management: Management): string {
|
|
80
|
+
return JSON.stringify(Management$outboundSchema.parse(management));
|
|
81
|
+
}
|