@compose-market/sdk 0.8.32 → 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.
Files changed (214) hide show
  1. package/dist/chains/index.d.ts +1 -1
  2. package/dist/chains/index.d.ts.map +1 -1
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +3 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/resources/botchain.d.ts +31 -0
  8. package/dist/resources/botchain.d.ts.map +1 -0
  9. package/dist/resources/botchain.js +91 -0
  10. package/dist/resources/botchain.js.map +1 -0
  11. package/dist/resources/channels.d.ts +4 -1
  12. package/dist/resources/channels.d.ts.map +1 -1
  13. package/dist/resources/channels.js +12 -0
  14. package/dist/resources/channels.js.map +1 -1
  15. package/dist/types/index.d.ts +158 -0
  16. package/dist/types/index.d.ts.map +1 -1
  17. package/dist/version.d.ts +1 -1
  18. package/dist/version.js +1 -1
  19. package/generated/channels/esm/funcs/channels-manage.d.ts +15 -0
  20. package/generated/channels/esm/funcs/channels-manage.d.ts.map +1 -0
  21. package/generated/channels/esm/funcs/channels-manage.js +76 -0
  22. package/generated/channels/esm/funcs/channels-manage.js.map +1 -0
  23. package/generated/channels/esm/lib/config.d.ts +4 -4
  24. package/generated/channels/esm/lib/config.js +4 -4
  25. package/generated/channels/esm/models/action.d.ts +15 -0
  26. package/generated/channels/esm/models/action.d.ts.map +1 -0
  27. package/generated/channels/esm/models/action.js +19 -0
  28. package/generated/channels/esm/models/action.js.map +1 -0
  29. package/generated/channels/esm/models/availability.d.ts +10 -0
  30. package/generated/channels/esm/models/availability.d.ts.map +1 -0
  31. package/generated/channels/esm/models/availability.js +11 -0
  32. package/generated/channels/esm/models/availability.js.map +1 -0
  33. package/generated/channels/esm/models/channel-link-response.d.ts +1 -18
  34. package/generated/channels/esm/models/channel-link-response.d.ts.map +1 -1
  35. package/generated/channels/esm/models/channel-link-response.js +2 -20
  36. package/generated/channels/esm/models/channel-link-response.js.map +1 -1
  37. package/generated/channels/esm/models/choices.d.ts +17 -0
  38. package/generated/channels/esm/models/choices.d.ts.map +1 -0
  39. package/generated/channels/esm/models/choices.js +22 -0
  40. package/generated/channels/esm/models/choices.js.map +1 -0
  41. package/generated/channels/esm/models/condition.d.ts +11 -0
  42. package/generated/channels/esm/models/condition.d.ts.map +1 -0
  43. package/generated/channels/esm/models/condition.js +12 -0
  44. package/generated/channels/esm/models/condition.js.map +1 -0
  45. package/generated/channels/esm/models/connected.d.ts +13 -0
  46. package/generated/channels/esm/models/connected.d.ts.map +1 -0
  47. package/generated/channels/esm/models/connected.js +17 -0
  48. package/generated/channels/esm/models/connected.js.map +1 -0
  49. package/generated/channels/esm/models/connection.d.ts +18 -0
  50. package/generated/channels/esm/models/connection.d.ts.map +1 -0
  51. package/generated/channels/esm/models/connection.js +23 -0
  52. package/generated/channels/esm/models/connection.js.map +1 -0
  53. package/generated/channels/esm/models/deletion.d.ts +16 -0
  54. package/generated/channels/esm/models/deletion.d.ts.map +1 -0
  55. package/generated/channels/esm/models/deletion.js +14 -0
  56. package/generated/channels/esm/models/deletion.js.map +1 -0
  57. package/generated/channels/esm/models/destination.d.ts +21 -0
  58. package/generated/channels/esm/models/destination.d.ts.map +1 -0
  59. package/generated/channels/esm/models/destination.js +26 -0
  60. package/generated/channels/esm/models/destination.js.map +1 -0
  61. package/generated/channels/esm/models/enumeration.d.ts +16 -0
  62. package/generated/channels/esm/models/enumeration.d.ts.map +1 -0
  63. package/generated/channels/esm/models/enumeration.js +14 -0
  64. package/generated/channels/esm/models/enumeration.js.map +1 -0
  65. package/generated/channels/esm/models/errors/error.d.ts +18 -0
  66. package/generated/channels/esm/models/errors/error.d.ts.map +1 -0
  67. package/generated/channels/esm/models/errors/error.js +34 -0
  68. package/generated/channels/esm/models/errors/error.js.map +1 -0
  69. package/generated/channels/esm/models/errors/index.d.ts +1 -0
  70. package/generated/channels/esm/models/errors/index.d.ts.map +1 -1
  71. package/generated/channels/esm/models/errors/index.js +1 -0
  72. package/generated/channels/esm/models/errors/index.js.map +1 -1
  73. package/generated/channels/esm/models/index.d.ts +28 -0
  74. package/generated/channels/esm/models/index.d.ts.map +1 -1
  75. package/generated/channels/esm/models/index.js +28 -0
  76. package/generated/channels/esm/models/index.js.map +1 -1
  77. package/generated/channels/esm/models/inspection.d.ts +14 -0
  78. package/generated/channels/esm/models/inspection.d.ts.map +1 -0
  79. package/generated/channels/esm/models/inspection.js +13 -0
  80. package/generated/channels/esm/models/inspection.js.map +1 -0
  81. package/generated/channels/esm/models/kind.d.ts +11 -0
  82. package/generated/channels/esm/models/kind.d.ts.map +1 -0
  83. package/generated/channels/esm/models/kind.js +13 -0
  84. package/generated/channels/esm/models/kind.js.map +1 -0
  85. package/generated/channels/esm/models/linkage.d.ts +17 -0
  86. package/generated/channels/esm/models/linkage.d.ts.map +1 -0
  87. package/generated/channels/esm/models/linkage.js +15 -0
  88. package/generated/channels/esm/models/linkage.js.map +1 -0
  89. package/generated/channels/esm/models/lookup.d.ts +19 -0
  90. package/generated/channels/esm/models/lookup.d.ts.map +1 -0
  91. package/generated/channels/esm/models/lookup.js +17 -0
  92. package/generated/channels/esm/models/lookup.js.map +1 -0
  93. package/generated/channels/esm/models/managed.d.ts +16 -0
  94. package/generated/channels/esm/models/managed.d.ts.map +1 -0
  95. package/generated/channels/esm/models/managed.js +26 -0
  96. package/generated/channels/esm/models/managed.js.map +1 -0
  97. package/generated/channels/esm/models/management.d.ts +17 -0
  98. package/generated/channels/esm/models/management.d.ts.map +1 -0
  99. package/generated/channels/esm/models/management.js +29 -0
  100. package/generated/channels/esm/models/management.js.map +1 -0
  101. package/generated/channels/esm/models/news.d.ts +23 -0
  102. package/generated/channels/esm/models/news.d.ts.map +1 -0
  103. package/generated/channels/esm/models/news.js +27 -0
  104. package/generated/channels/esm/models/news.js.map +1 -0
  105. package/generated/channels/esm/models/preference.d.ts +27 -0
  106. package/generated/channels/esm/models/preference.d.ts.map +1 -0
  107. package/generated/channels/esm/models/preference.js +24 -0
  108. package/generated/channels/esm/models/preference.js.map +1 -0
  109. package/generated/channels/esm/models/result.d.ts +10 -0
  110. package/generated/channels/esm/models/result.d.ts.map +1 -0
  111. package/generated/channels/esm/models/result.js +14 -0
  112. package/generated/channels/esm/models/result.js.map +1 -0
  113. package/generated/channels/esm/models/selection.d.ts +18 -0
  114. package/generated/channels/esm/models/selection.d.ts.map +1 -0
  115. package/generated/channels/esm/models/selection.js +15 -0
  116. package/generated/channels/esm/models/selection.js.map +1 -0
  117. package/generated/channels/esm/models/sentiment.d.ts +13 -0
  118. package/generated/channels/esm/models/sentiment.d.ts.map +1 -0
  119. package/generated/channels/esm/models/sentiment.js +14 -0
  120. package/generated/channels/esm/models/sentiment.js.map +1 -0
  121. package/generated/channels/esm/models/signals.d.ts +28 -0
  122. package/generated/channels/esm/models/signals.d.ts.map +1 -0
  123. package/generated/channels/esm/models/signals.js +32 -0
  124. package/generated/channels/esm/models/signals.js.map +1 -0
  125. package/generated/channels/esm/models/source.d.ts +12 -0
  126. package/generated/channels/esm/models/source.d.ts.map +1 -0
  127. package/generated/channels/esm/models/source.js +15 -0
  128. package/generated/channels/esm/models/source.js.map +1 -0
  129. package/generated/channels/esm/models/status.d.ts +15 -0
  130. package/generated/channels/esm/models/status.d.ts.map +1 -0
  131. package/generated/channels/esm/models/status.js +18 -0
  132. package/generated/channels/esm/models/status.js.map +1 -0
  133. package/generated/channels/esm/models/subscribe.d.ts +19 -0
  134. package/generated/channels/esm/models/subscribe.d.ts.map +1 -0
  135. package/generated/channels/esm/models/subscribe.js +16 -0
  136. package/generated/channels/esm/models/subscribe.js.map +1 -0
  137. package/generated/channels/esm/models/subscription.d.ts +26 -0
  138. package/generated/channels/esm/models/subscription.d.ts.map +1 -0
  139. package/generated/channels/esm/models/subscription.js +32 -0
  140. package/generated/channels/esm/models/subscription.js.map +1 -0
  141. package/generated/channels/esm/models/toggle.d.ts +18 -0
  142. package/generated/channels/esm/models/toggle.d.ts.map +1 -0
  143. package/generated/channels/esm/models/toggle.js +16 -0
  144. package/generated/channels/esm/models/toggle.js.map +1 -0
  145. package/generated/channels/esm/models/type.d.ts +11 -0
  146. package/generated/channels/esm/models/type.d.ts.map +1 -0
  147. package/generated/channels/esm/models/type.js +13 -0
  148. package/generated/channels/esm/models/type.js.map +1 -0
  149. package/generated/channels/esm/models/unlink.d.ts +16 -0
  150. package/generated/channels/esm/models/unlink.d.ts.map +1 -0
  151. package/generated/channels/esm/models/unlink.js +15 -0
  152. package/generated/channels/esm/models/unlink.js.map +1 -0
  153. package/generated/channels/esm/sdk/channels.d.ts +4 -0
  154. package/generated/channels/esm/sdk/channels.d.ts.map +1 -1
  155. package/generated/channels/esm/sdk/channels.js +7 -0
  156. package/generated/channels/esm/sdk/channels.js.map +1 -1
  157. package/generated/channels/package.json +2 -2
  158. package/generated/channels/src/funcs/channels-manage.ts +164 -0
  159. package/generated/channels/src/lib/config.ts +4 -4
  160. package/generated/channels/src/models/action.ts +37 -0
  161. package/generated/channels/src/models/availability.ts +17 -0
  162. package/generated/channels/src/models/channel-link-response.ts +2 -39
  163. package/generated/channels/src/models/choices.ts +49 -0
  164. package/generated/channels/src/models/condition.ts +18 -0
  165. package/generated/channels/src/models/connected.ts +32 -0
  166. package/generated/channels/src/models/connection.ts +43 -0
  167. package/generated/channels/src/models/deletion.ts +32 -0
  168. package/generated/channels/src/models/destination.ts +48 -0
  169. package/generated/channels/src/models/enumeration.ts +32 -0
  170. package/generated/channels/src/models/errors/error.ts +49 -0
  171. package/generated/channels/src/models/errors/index.ts +1 -0
  172. package/generated/channels/src/models/index.ts +28 -0
  173. package/generated/channels/src/models/inspection.ts +29 -0
  174. package/generated/channels/src/models/kind.ts +18 -0
  175. package/generated/channels/src/models/linkage.ts +31 -0
  176. package/generated/channels/src/models/lookup.ts +34 -0
  177. package/generated/channels/src/models/managed.ts +46 -0
  178. package/generated/channels/src/models/management.ts +81 -0
  179. package/generated/channels/src/models/news.ts +54 -0
  180. package/generated/channels/src/models/preference.ts +62 -0
  181. package/generated/channels/src/models/result.ts +28 -0
  182. package/generated/channels/src/models/selection.ts +35 -0
  183. package/generated/channels/src/models/sentiment.ts +21 -0
  184. package/generated/channels/src/models/signals.ts +66 -0
  185. package/generated/channels/src/models/source.ts +20 -0
  186. package/generated/channels/src/models/status.ts +34 -0
  187. package/generated/channels/src/models/subscribe.ts +40 -0
  188. package/generated/channels/src/models/subscription.ts +69 -0
  189. package/generated/channels/src/models/toggle.ts +33 -0
  190. package/generated/channels/src/models/type.ts +18 -0
  191. package/generated/channels/src/models/unlink.ts +30 -0
  192. package/generated/channels/src/sdk/channels.ts +15 -0
  193. package/generated/inference/esm/lib/config.d.ts +3 -3
  194. package/generated/inference/esm/lib/config.js +3 -3
  195. package/generated/inference/package.json +1 -1
  196. package/generated/inference/src/lib/config.ts +3 -3
  197. package/generated/manowar/esm/lib/config.d.ts +3 -3
  198. package/generated/manowar/esm/lib/config.js +3 -3
  199. package/generated/manowar/package.json +1 -1
  200. package/generated/manowar/src/lib/config.ts +3 -3
  201. package/generated/memory/esm/lib/config.d.ts +3 -3
  202. package/generated/memory/esm/lib/config.js +3 -3
  203. package/generated/memory/package.json +1 -1
  204. package/generated/memory/src/lib/config.ts +3 -3
  205. package/generated/x402/esm/lib/config.d.ts +3 -3
  206. package/generated/x402/esm/lib/config.js +3 -3
  207. package/generated/x402/esm/models/facilitator-chain.d.ts +1 -1
  208. package/generated/x402/esm/models/facilitator-chain.d.ts.map +1 -1
  209. package/generated/x402/esm/models/facilitator-chain.js +1 -1
  210. package/generated/x402/esm/models/facilitator-chain.js.map +1 -1
  211. package/generated/x402/package.json +1 -1
  212. package/generated/x402/src/lib/config.ts +3 -3
  213. package/generated/x402/src/models/facilitator-chain.ts +2 -2
  214. package/package.json +10 -10
@@ -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,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./error.js";
5
6
  export * from "./http-client-errors.js";
6
7
  export * from "./response-validation-error.js";
7
8
  export * from "./sdk-default-error.js";
@@ -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
+ }
@@ -0,0 +1,54 @@
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 News = {
12
+ categoryId?: Array<number> | undefined;
13
+ subCategoryId?: Array<number> | undefined;
14
+ tokenId?: Array<number> | undefined;
15
+ searchQuery?: string | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export const News$inboundSchema: z.ZodMiniType<News, unknown> = z.object({
20
+ categoryId: types.optional(z.array(types.number())),
21
+ subCategoryId: types.optional(z.array(types.number())),
22
+ tokenId: types.optional(z.array(types.number())),
23
+ searchQuery: types.optional(types.string()),
24
+ });
25
+ /** @internal */
26
+ export type News$Outbound = {
27
+ categoryId?: Array<number> | undefined;
28
+ subCategoryId?: Array<number> | undefined;
29
+ tokenId?: Array<number> | undefined;
30
+ searchQuery?: string | undefined;
31
+ };
32
+
33
+ /** @internal */
34
+ export const News$outboundSchema: z.ZodMiniType<News$Outbound, News> = z.object(
35
+ {
36
+ categoryId: z.optional(z.array(z.int())),
37
+ subCategoryId: z.optional(z.array(z.int())),
38
+ tokenId: z.optional(z.array(z.int())),
39
+ searchQuery: z.optional(z.string()),
40
+ },
41
+ );
42
+
43
+ export function newsToJSON(news: News): string {
44
+ return JSON.stringify(News$outboundSchema.parse(news));
45
+ }
46
+ export function newsFromJSON(
47
+ jsonString: string,
48
+ ): SafeParseResult<News, SDKValidationError> {
49
+ return safeParse(
50
+ jsonString,
51
+ (x) => News$inboundSchema.parse(JSON.parse(x)),
52
+ `Failed to parse 'News' from JSON`,
53
+ );
54
+ }
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { smartUnion } from "../types/smart-union.js";
7
+ import { News, News$Outbound, News$outboundSchema } from "./news.js";
8
+ import {
9
+ Signals,
10
+ Signals$Outbound,
11
+ Signals$outboundSchema,
12
+ } from "./signals.js";
13
+ import { Source, Source$outboundSchema } from "./source.js";
14
+
15
+ export type PreferenceFilters = Signals | News;
16
+
17
+ export type Preference = {
18
+ destinationId: string;
19
+ source: Source;
20
+ filters: Signals | News;
21
+ enabled: boolean;
22
+ };
23
+
24
+ /** @internal */
25
+ export type PreferenceFilters$Outbound = Signals$Outbound | News$Outbound;
26
+
27
+ /** @internal */
28
+ export const PreferenceFilters$outboundSchema: z.ZodMiniType<
29
+ PreferenceFilters$Outbound,
30
+ PreferenceFilters
31
+ > = smartUnion([Signals$outboundSchema, News$outboundSchema]);
32
+
33
+ export function preferenceFiltersToJSON(
34
+ preferenceFilters: PreferenceFilters,
35
+ ): string {
36
+ return JSON.stringify(
37
+ PreferenceFilters$outboundSchema.parse(preferenceFilters),
38
+ );
39
+ }
40
+
41
+ /** @internal */
42
+ export type Preference$Outbound = {
43
+ destinationId: string;
44
+ source: string;
45
+ filters: Signals$Outbound | News$Outbound;
46
+ enabled: boolean;
47
+ };
48
+
49
+ /** @internal */
50
+ export const Preference$outboundSchema: z.ZodMiniType<
51
+ Preference$Outbound,
52
+ Preference
53
+ > = z.object({
54
+ destinationId: z.string(),
55
+ source: Source$outboundSchema,
56
+ filters: smartUnion([Signals$outboundSchema, News$outboundSchema]),
57
+ enabled: z.boolean(),
58
+ });
59
+
60
+ export function preferenceToJSON(preference: Preference): string {
61
+ return JSON.stringify(Preference$outboundSchema.parse(preference));
62
+ }
@@ -0,0 +1,28 @@
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 Result = {
12
+ ok: boolean;
13
+ };
14
+
15
+ /** @internal */
16
+ export const Result$inboundSchema: z.ZodMiniType<Result, unknown> = z.object({
17
+ ok: types.boolean(),
18
+ });
19
+
20
+ export function resultFromJSON(
21
+ jsonString: string,
22
+ ): SafeParseResult<Result, SDKValidationError> {
23
+ return safeParse(
24
+ jsonString,
25
+ (x) => Result$inboundSchema.parse(JSON.parse(x)),
26
+ `Failed to parse 'Result' from JSON`,
27
+ );
28
+ }
@@ -0,0 +1,35 @@
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 Selection = {
8
+ userAddress: string;
9
+ operation: "destination";
10
+ connectionId: string;
11
+ nativeId: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type Selection$Outbound = {
16
+ userAddress: string;
17
+ operation: "destination";
18
+ connectionId: string;
19
+ nativeId: string;
20
+ };
21
+
22
+ /** @internal */
23
+ export const Selection$outboundSchema: z.ZodMiniType<
24
+ Selection$Outbound,
25
+ Selection
26
+ > = z.object({
27
+ userAddress: z.string(),
28
+ operation: z.literal("destination"),
29
+ connectionId: z.string(),
30
+ nativeId: z.string(),
31
+ });
32
+
33
+ export function selectionToJSON(selection: Selection): string {
34
+ return JSON.stringify(Selection$outboundSchema.parse(selection));
35
+ }