@hookdeck/outpost-sdk 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +36 -0
  2. package/bin/mcp-server.js +457 -38
  3. package/bin/mcp-server.js.map +27 -20
  4. package/dist/commonjs/funcs/eventsList.d.ts +4 -2
  5. package/dist/commonjs/funcs/eventsList.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/eventsList.js +46 -8
  7. package/dist/commonjs/funcs/eventsList.js.map +1 -1
  8. package/dist/commonjs/funcs/eventsListByDestination.d.ts +4 -2
  9. package/dist/commonjs/funcs/eventsListByDestination.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/eventsListByDestination.js +44 -8
  11. package/dist/commonjs/funcs/eventsListByDestination.js.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/lib/security.d.ts.map +1 -1
  15. package/dist/commonjs/lib/security.js.map +1 -1
  16. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  17. package/dist/commonjs/mcp-server/server.js +1 -1
  18. package/dist/commonjs/mcp-server/tools/eventsList.js +1 -1
  19. package/dist/commonjs/mcp-server/tools/eventsList.js.map +1 -1
  20. package/dist/commonjs/mcp-server/tools/eventsListByDestination.js +1 -1
  21. package/dist/commonjs/mcp-server/tools/eventsListByDestination.js.map +1 -1
  22. package/dist/commonjs/models/components/awss3config.d.ts +47 -0
  23. package/dist/commonjs/models/components/awss3config.d.ts.map +1 -0
  24. package/dist/commonjs/models/components/awss3config.js +86 -0
  25. package/dist/commonjs/models/components/awss3config.js.map +1 -0
  26. package/dist/commonjs/models/components/awss3credentials.d.ts +42 -0
  27. package/dist/commonjs/models/components/awss3credentials.d.ts.map +1 -0
  28. package/dist/commonjs/models/components/awss3credentials.js +73 -0
  29. package/dist/commonjs/models/components/awss3credentials.js.map +1 -0
  30. package/dist/commonjs/models/components/destination.d.ts +5 -0
  31. package/dist/commonjs/models/components/destination.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/destination.js +7 -0
  33. package/dist/commonjs/models/components/destination.js.map +1 -1
  34. package/dist/commonjs/models/components/destinationawss3.d.ts +98 -0
  35. package/dist/commonjs/models/components/destinationawss3.d.ts.map +1 -0
  36. package/dist/commonjs/models/components/destinationawss3.js +122 -0
  37. package/dist/commonjs/models/components/destinationawss3.js.map +1 -0
  38. package/dist/commonjs/models/components/destinationcreate.d.ts +5 -0
  39. package/dist/commonjs/models/components/destinationcreate.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/destinationcreate.js +7 -0
  41. package/dist/commonjs/models/components/destinationcreate.js.map +1 -1
  42. package/dist/commonjs/models/components/destinationcreateawss3.d.ts +78 -0
  43. package/dist/commonjs/models/components/destinationcreateawss3.d.ts.map +1 -0
  44. package/dist/commonjs/models/components/destinationcreateawss3.js +101 -0
  45. package/dist/commonjs/models/components/destinationcreateawss3.js.map +1 -0
  46. package/dist/commonjs/models/components/destinationupdate.d.ts +3 -2
  47. package/dist/commonjs/models/components/destinationupdate.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/destinationupdate.js +3 -0
  49. package/dist/commonjs/models/components/destinationupdate.js.map +1 -1
  50. package/dist/commonjs/models/components/destinationupdateawss3.d.ts +39 -0
  51. package/dist/commonjs/models/components/destinationupdateawss3.d.ts.map +1 -0
  52. package/dist/commonjs/models/components/destinationupdateawss3.js +76 -0
  53. package/dist/commonjs/models/components/destinationupdateawss3.js.map +1 -0
  54. package/dist/commonjs/models/components/index.d.ts +5 -0
  55. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/index.js +5 -0
  57. package/dist/commonjs/models/components/index.js.map +1 -1
  58. package/dist/commonjs/models/operations/getdestinationtypeschema.d.ts +3 -0
  59. package/dist/commonjs/models/operations/getdestinationtypeschema.d.ts.map +1 -1
  60. package/dist/commonjs/models/operations/getdestinationtypeschema.js +1 -0
  61. package/dist/commonjs/models/operations/getdestinationtypeschema.js.map +1 -1
  62. package/dist/commonjs/models/operations/gettenantdestinationtypeschema.d.ts +3 -0
  63. package/dist/commonjs/models/operations/gettenantdestinationtypeschema.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/gettenantdestinationtypeschema.js +1 -0
  65. package/dist/commonjs/models/operations/gettenantdestinationtypeschema.js.map +1 -1
  66. package/dist/commonjs/models/operations/listtenantdestinations.d.ts +6 -0
  67. package/dist/commonjs/models/operations/listtenantdestinations.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/listtenantdestinations.js +2 -0
  69. package/dist/commonjs/models/operations/listtenantdestinations.js.map +1 -1
  70. package/dist/commonjs/models/operations/listtenantevents.d.ts +94 -0
  71. package/dist/commonjs/models/operations/listtenantevents.d.ts.map +1 -1
  72. package/dist/commonjs/models/operations/listtenantevents.js +92 -1
  73. package/dist/commonjs/models/operations/listtenantevents.js.map +1 -1
  74. package/dist/commonjs/models/operations/listtenanteventsbydestination.d.ts +94 -0
  75. package/dist/commonjs/models/operations/listtenanteventsbydestination.d.ts.map +1 -1
  76. package/dist/commonjs/models/operations/listtenanteventsbydestination.js +92 -1
  77. package/dist/commonjs/models/operations/listtenanteventsbydestination.js.map +1 -1
  78. package/dist/commonjs/sdk/events.d.ts +7 -2
  79. package/dist/commonjs/sdk/events.d.ts.map +1 -1
  80. package/dist/commonjs/sdk/events.js +3 -2
  81. package/dist/commonjs/sdk/events.js.map +1 -1
  82. package/dist/esm/funcs/eventsList.d.ts +4 -2
  83. package/dist/esm/funcs/eventsList.d.ts.map +1 -1
  84. package/dist/esm/funcs/eventsList.js +46 -8
  85. package/dist/esm/funcs/eventsList.js.map +1 -1
  86. package/dist/esm/funcs/eventsListByDestination.d.ts +4 -2
  87. package/dist/esm/funcs/eventsListByDestination.d.ts.map +1 -1
  88. package/dist/esm/funcs/eventsListByDestination.js +44 -8
  89. package/dist/esm/funcs/eventsListByDestination.js.map +1 -1
  90. package/dist/esm/lib/config.d.ts +3 -3
  91. package/dist/esm/lib/config.js +3 -3
  92. package/dist/esm/lib/security.d.ts.map +1 -1
  93. package/dist/esm/lib/security.js.map +1 -1
  94. package/dist/esm/mcp-server/mcp-server.js +1 -1
  95. package/dist/esm/mcp-server/server.js +1 -1
  96. package/dist/esm/mcp-server/tools/eventsList.js +1 -1
  97. package/dist/esm/mcp-server/tools/eventsList.js.map +1 -1
  98. package/dist/esm/mcp-server/tools/eventsListByDestination.js +1 -1
  99. package/dist/esm/mcp-server/tools/eventsListByDestination.js.map +1 -1
  100. package/dist/esm/models/components/awss3config.d.ts +47 -0
  101. package/dist/esm/models/components/awss3config.d.ts.map +1 -0
  102. package/dist/esm/models/components/awss3config.js +48 -0
  103. package/dist/esm/models/components/awss3config.js.map +1 -0
  104. package/dist/esm/models/components/awss3credentials.d.ts +42 -0
  105. package/dist/esm/models/components/awss3credentials.d.ts.map +1 -0
  106. package/dist/esm/models/components/awss3credentials.js +35 -0
  107. package/dist/esm/models/components/awss3credentials.js.map +1 -0
  108. package/dist/esm/models/components/destination.d.ts +5 -0
  109. package/dist/esm/models/components/destination.d.ts.map +1 -1
  110. package/dist/esm/models/components/destination.js +7 -0
  111. package/dist/esm/models/components/destination.js.map +1 -1
  112. package/dist/esm/models/components/destinationawss3.d.ts +98 -0
  113. package/dist/esm/models/components/destinationawss3.d.ts.map +1 -0
  114. package/dist/esm/models/components/destinationawss3.js +84 -0
  115. package/dist/esm/models/components/destinationawss3.js.map +1 -0
  116. package/dist/esm/models/components/destinationcreate.d.ts +5 -0
  117. package/dist/esm/models/components/destinationcreate.d.ts.map +1 -1
  118. package/dist/esm/models/components/destinationcreate.js +7 -0
  119. package/dist/esm/models/components/destinationcreate.js.map +1 -1
  120. package/dist/esm/models/components/destinationcreateawss3.d.ts +78 -0
  121. package/dist/esm/models/components/destinationcreateawss3.d.ts.map +1 -0
  122. package/dist/esm/models/components/destinationcreateawss3.js +63 -0
  123. package/dist/esm/models/components/destinationcreateawss3.js.map +1 -0
  124. package/dist/esm/models/components/destinationupdate.d.ts +3 -2
  125. package/dist/esm/models/components/destinationupdate.d.ts.map +1 -1
  126. package/dist/esm/models/components/destinationupdate.js +3 -0
  127. package/dist/esm/models/components/destinationupdate.js.map +1 -1
  128. package/dist/esm/models/components/destinationupdateawss3.d.ts +39 -0
  129. package/dist/esm/models/components/destinationupdateawss3.d.ts.map +1 -0
  130. package/dist/esm/models/components/destinationupdateawss3.js +38 -0
  131. package/dist/esm/models/components/destinationupdateawss3.js.map +1 -0
  132. package/dist/esm/models/components/index.d.ts +5 -0
  133. package/dist/esm/models/components/index.d.ts.map +1 -1
  134. package/dist/esm/models/components/index.js +5 -0
  135. package/dist/esm/models/components/index.js.map +1 -1
  136. package/dist/esm/models/operations/getdestinationtypeschema.d.ts +3 -0
  137. package/dist/esm/models/operations/getdestinationtypeschema.d.ts.map +1 -1
  138. package/dist/esm/models/operations/getdestinationtypeschema.js +1 -0
  139. package/dist/esm/models/operations/getdestinationtypeschema.js.map +1 -1
  140. package/dist/esm/models/operations/gettenantdestinationtypeschema.d.ts +3 -0
  141. package/dist/esm/models/operations/gettenantdestinationtypeschema.d.ts.map +1 -1
  142. package/dist/esm/models/operations/gettenantdestinationtypeschema.js +1 -0
  143. package/dist/esm/models/operations/gettenantdestinationtypeschema.js.map +1 -1
  144. package/dist/esm/models/operations/listtenantdestinations.d.ts +6 -0
  145. package/dist/esm/models/operations/listtenantdestinations.d.ts.map +1 -1
  146. package/dist/esm/models/operations/listtenantdestinations.js +2 -0
  147. package/dist/esm/models/operations/listtenantdestinations.js.map +1 -1
  148. package/dist/esm/models/operations/listtenantevents.d.ts +94 -0
  149. package/dist/esm/models/operations/listtenantevents.d.ts.map +1 -1
  150. package/dist/esm/models/operations/listtenantevents.js +87 -0
  151. package/dist/esm/models/operations/listtenantevents.js.map +1 -1
  152. package/dist/esm/models/operations/listtenanteventsbydestination.d.ts +94 -0
  153. package/dist/esm/models/operations/listtenanteventsbydestination.d.ts.map +1 -1
  154. package/dist/esm/models/operations/listtenanteventsbydestination.js +87 -0
  155. package/dist/esm/models/operations/listtenanteventsbydestination.js.map +1 -1
  156. package/dist/esm/sdk/events.d.ts +7 -2
  157. package/dist/esm/sdk/events.d.ts.map +1 -1
  158. package/dist/esm/sdk/events.js +3 -2
  159. package/dist/esm/sdk/events.js.map +1 -1
  160. package/docs/sdks/events/README.md +14 -6
  161. package/examples/healthCheck.example.ts +1 -1
  162. package/examples/package-lock.json +3 -3
  163. package/jsr.json +1 -1
  164. package/package.json +3 -3
  165. package/src/funcs/eventsList.ts +122 -42
  166. package/src/funcs/eventsListByDestination.ts +124 -42
  167. package/src/lib/config.ts +3 -3
  168. package/src/lib/security.ts +4 -1
  169. package/src/mcp-server/mcp-server.ts +1 -1
  170. package/src/mcp-server/server.ts +1 -1
  171. package/src/mcp-server/tools/eventsList.ts +1 -1
  172. package/src/mcp-server/tools/eventsListByDestination.ts +1 -1
  173. package/src/models/components/awss3config.ts +97 -0
  174. package/src/models/components/awss3credentials.ts +83 -0
  175. package/src/models/components/destination.ts +18 -0
  176. package/src/models/components/destinationawss3.ts +185 -0
  177. package/src/models/components/destinationcreate.ts +18 -0
  178. package/src/models/components/destinationcreateawss3.ts +144 -0
  179. package/src/models/components/destinationupdate.ts +12 -2
  180. package/src/models/components/destinationupdateawss3.ts +95 -0
  181. package/src/models/components/index.ts +5 -0
  182. package/src/models/operations/getdestinationtypeschema.ts +1 -0
  183. package/src/models/operations/gettenantdestinationtypeschema.ts +1 -0
  184. package/src/models/operations/listtenantdestinations.ts +2 -0
  185. package/src/models/operations/listtenantevents.ts +198 -0
  186. package/src/models/operations/listtenanteventsbydestination.ts +215 -0
  187. package/src/sdk/events.ts +12 -4
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type Awss3Credentials = {
11
+ /**
12
+ * AWS Access Key ID.
13
+ */
14
+ key: string;
15
+ /**
16
+ * AWS Secret Access Key.
17
+ */
18
+ secret: string;
19
+ /**
20
+ * Optional AWS Session Token (for temporary credentials).
21
+ */
22
+ session?: string | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const Awss3Credentials$inboundSchema: z.ZodType<
27
+ Awss3Credentials,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ key: z.string(),
32
+ secret: z.string(),
33
+ session: z.string().optional(),
34
+ });
35
+
36
+ /** @internal */
37
+ export type Awss3Credentials$Outbound = {
38
+ key: string;
39
+ secret: string;
40
+ session?: string | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const Awss3Credentials$outboundSchema: z.ZodType<
45
+ Awss3Credentials$Outbound,
46
+ z.ZodTypeDef,
47
+ Awss3Credentials
48
+ > = z.object({
49
+ key: z.string(),
50
+ secret: z.string(),
51
+ session: z.string().optional(),
52
+ });
53
+
54
+ /**
55
+ * @internal
56
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
+ */
58
+ export namespace Awss3Credentials$ {
59
+ /** @deprecated use `Awss3Credentials$inboundSchema` instead. */
60
+ export const inboundSchema = Awss3Credentials$inboundSchema;
61
+ /** @deprecated use `Awss3Credentials$outboundSchema` instead. */
62
+ export const outboundSchema = Awss3Credentials$outboundSchema;
63
+ /** @deprecated use `Awss3Credentials$Outbound` instead. */
64
+ export type Outbound = Awss3Credentials$Outbound;
65
+ }
66
+
67
+ export function awss3CredentialsToJSON(
68
+ awss3Credentials: Awss3Credentials,
69
+ ): string {
70
+ return JSON.stringify(
71
+ Awss3Credentials$outboundSchema.parse(awss3Credentials),
72
+ );
73
+ }
74
+
75
+ export function awss3CredentialsFromJSON(
76
+ jsonString: string,
77
+ ): SafeParseResult<Awss3Credentials, SDKValidationError> {
78
+ return safeParse(
79
+ jsonString,
80
+ (x) => Awss3Credentials$inboundSchema.parse(JSON.parse(x)),
81
+ `Failed to parse 'Awss3Credentials' from JSON`,
82
+ );
83
+ }
@@ -12,6 +12,12 @@ import {
12
12
  DestinationAWSKinesis$Outbound,
13
13
  DestinationAWSKinesis$outboundSchema,
14
14
  } from "./destinationawskinesis.js";
15
+ import {
16
+ DestinationAwss3,
17
+ DestinationAwss3$inboundSchema,
18
+ DestinationAwss3$Outbound,
19
+ DestinationAwss3$outboundSchema,
20
+ } from "./destinationawss3.js";
15
21
  import {
16
22
  DestinationAWSSQS,
17
23
  DestinationAWSSQS$inboundSchema,
@@ -49,6 +55,7 @@ export type Destination =
49
55
  | (DestinationRabbitMQ & { type: "rabbitmq" })
50
56
  | (DestinationAWSKinesis & { type: "aws_kinesis" })
51
57
  | (DestinationAzureServiceBus & { type: "azure_servicebus" })
58
+ | (DestinationAwss3 & { type: "aws_s3" })
52
59
  | (DestinationHookdeck & { type: "hookdeck" });
53
60
 
54
61
  /** @internal */
@@ -82,6 +89,11 @@ export const Destination$inboundSchema: z.ZodType<
82
89
  type: v.type,
83
90
  })),
84
91
  ),
92
+ DestinationAwss3$inboundSchema.and(
93
+ z.object({ type: z.literal("aws_s3") }).transform((v) => ({
94
+ type: v.type,
95
+ })),
96
+ ),
85
97
  DestinationHookdeck$inboundSchema.and(
86
98
  z.object({ type: z.literal("hookdeck") }).transform((v) => ({
87
99
  type: v.type,
@@ -96,6 +108,7 @@ export type Destination$Outbound =
96
108
  | (DestinationRabbitMQ$Outbound & { type: "rabbitmq" })
97
109
  | (DestinationAWSKinesis$Outbound & { type: "aws_kinesis" })
98
110
  | (DestinationAzureServiceBus$Outbound & { type: "azure_servicebus" })
111
+ | (DestinationAwss3$Outbound & { type: "aws_s3" })
99
112
  | (DestinationHookdeck$Outbound & { type: "hookdeck" });
100
113
 
101
114
  /** @internal */
@@ -129,6 +142,11 @@ export const Destination$outboundSchema: z.ZodType<
129
142
  type: v.type,
130
143
  })),
131
144
  ),
145
+ DestinationAwss3$outboundSchema.and(
146
+ z.object({ type: z.literal("aws_s3") }).transform((v) => ({
147
+ type: v.type,
148
+ })),
149
+ ),
132
150
  DestinationHookdeck$outboundSchema.and(
133
151
  z.object({ type: z.literal("hookdeck") }).transform((v) => ({
134
152
  type: v.type,
@@ -0,0 +1,185 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Awss3Config,
13
+ Awss3Config$inboundSchema,
14
+ Awss3Config$Outbound,
15
+ Awss3Config$outboundSchema,
16
+ } from "./awss3config.js";
17
+ import {
18
+ Awss3Credentials,
19
+ Awss3Credentials$inboundSchema,
20
+ Awss3Credentials$Outbound,
21
+ Awss3Credentials$outboundSchema,
22
+ } from "./awss3credentials.js";
23
+ import {
24
+ Topics,
25
+ Topics$inboundSchema,
26
+ Topics$Outbound,
27
+ Topics$outboundSchema,
28
+ } from "./topics.js";
29
+
30
+ /**
31
+ * Type of the destination.
32
+ */
33
+ export const DestinationAwss3Type = {
34
+ AwsS3: "aws_s3",
35
+ } as const;
36
+ /**
37
+ * Type of the destination.
38
+ */
39
+ export type DestinationAwss3Type = ClosedEnum<typeof DestinationAwss3Type>;
40
+
41
+ export type DestinationAwss3 = {
42
+ /**
43
+ * Control plane generated ID or user provided ID for the destination.
44
+ */
45
+ id: string;
46
+ /**
47
+ * Type of the destination.
48
+ */
49
+ type: DestinationAwss3Type;
50
+ /**
51
+ * "*" or an array of enabled topics.
52
+ */
53
+ topics: Topics;
54
+ /**
55
+ * ISO Date when the destination was disabled, or null if enabled.
56
+ */
57
+ disabledAt: Date | null;
58
+ /**
59
+ * ISO Date when the destination was created.
60
+ */
61
+ createdAt: Date;
62
+ config: Awss3Config;
63
+ credentials: Awss3Credentials;
64
+ /**
65
+ * A human-readable representation of the destination target (bucket and region). Read-only.
66
+ */
67
+ target?: string | undefined;
68
+ /**
69
+ * A URL link to the destination target (AWS Console link to the bucket). Read-only.
70
+ */
71
+ targetUrl?: string | null | undefined;
72
+ };
73
+
74
+ /** @internal */
75
+ export const DestinationAwss3Type$inboundSchema: z.ZodNativeEnum<
76
+ typeof DestinationAwss3Type
77
+ > = z.nativeEnum(DestinationAwss3Type);
78
+
79
+ /** @internal */
80
+ export const DestinationAwss3Type$outboundSchema: z.ZodNativeEnum<
81
+ typeof DestinationAwss3Type
82
+ > = DestinationAwss3Type$inboundSchema;
83
+
84
+ /**
85
+ * @internal
86
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
87
+ */
88
+ export namespace DestinationAwss3Type$ {
89
+ /** @deprecated use `DestinationAwss3Type$inboundSchema` instead. */
90
+ export const inboundSchema = DestinationAwss3Type$inboundSchema;
91
+ /** @deprecated use `DestinationAwss3Type$outboundSchema` instead. */
92
+ export const outboundSchema = DestinationAwss3Type$outboundSchema;
93
+ }
94
+
95
+ /** @internal */
96
+ export const DestinationAwss3$inboundSchema: z.ZodType<
97
+ DestinationAwss3,
98
+ z.ZodTypeDef,
99
+ unknown
100
+ > = z.object({
101
+ id: z.string(),
102
+ type: DestinationAwss3Type$inboundSchema,
103
+ topics: Topics$inboundSchema,
104
+ disabled_at: z.nullable(
105
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
106
+ ),
107
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
108
+ config: Awss3Config$inboundSchema,
109
+ credentials: Awss3Credentials$inboundSchema,
110
+ target: z.string().optional(),
111
+ target_url: z.nullable(z.string()).optional(),
112
+ }).transform((v) => {
113
+ return remap$(v, {
114
+ "disabled_at": "disabledAt",
115
+ "created_at": "createdAt",
116
+ "target_url": "targetUrl",
117
+ });
118
+ });
119
+
120
+ /** @internal */
121
+ export type DestinationAwss3$Outbound = {
122
+ id: string;
123
+ type: string;
124
+ topics: Topics$Outbound;
125
+ disabled_at: string | null;
126
+ created_at: string;
127
+ config: Awss3Config$Outbound;
128
+ credentials: Awss3Credentials$Outbound;
129
+ target?: string | undefined;
130
+ target_url?: string | null | undefined;
131
+ };
132
+
133
+ /** @internal */
134
+ export const DestinationAwss3$outboundSchema: z.ZodType<
135
+ DestinationAwss3$Outbound,
136
+ z.ZodTypeDef,
137
+ DestinationAwss3
138
+ > = z.object({
139
+ id: z.string(),
140
+ type: DestinationAwss3Type$outboundSchema,
141
+ topics: Topics$outboundSchema,
142
+ disabledAt: z.nullable(z.date().transform(v => v.toISOString())),
143
+ createdAt: z.date().transform(v => v.toISOString()),
144
+ config: Awss3Config$outboundSchema,
145
+ credentials: Awss3Credentials$outboundSchema,
146
+ target: z.string().optional(),
147
+ targetUrl: z.nullable(z.string()).optional(),
148
+ }).transform((v) => {
149
+ return remap$(v, {
150
+ disabledAt: "disabled_at",
151
+ createdAt: "created_at",
152
+ targetUrl: "target_url",
153
+ });
154
+ });
155
+
156
+ /**
157
+ * @internal
158
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
159
+ */
160
+ export namespace DestinationAwss3$ {
161
+ /** @deprecated use `DestinationAwss3$inboundSchema` instead. */
162
+ export const inboundSchema = DestinationAwss3$inboundSchema;
163
+ /** @deprecated use `DestinationAwss3$outboundSchema` instead. */
164
+ export const outboundSchema = DestinationAwss3$outboundSchema;
165
+ /** @deprecated use `DestinationAwss3$Outbound` instead. */
166
+ export type Outbound = DestinationAwss3$Outbound;
167
+ }
168
+
169
+ export function destinationAwss3ToJSON(
170
+ destinationAwss3: DestinationAwss3,
171
+ ): string {
172
+ return JSON.stringify(
173
+ DestinationAwss3$outboundSchema.parse(destinationAwss3),
174
+ );
175
+ }
176
+
177
+ export function destinationAwss3FromJSON(
178
+ jsonString: string,
179
+ ): SafeParseResult<DestinationAwss3, SDKValidationError> {
180
+ return safeParse(
181
+ jsonString,
182
+ (x) => DestinationAwss3$inboundSchema.parse(JSON.parse(x)),
183
+ `Failed to parse 'DestinationAwss3' from JSON`,
184
+ );
185
+ }
@@ -12,6 +12,12 @@ import {
12
12
  DestinationCreateAWSKinesis$Outbound,
13
13
  DestinationCreateAWSKinesis$outboundSchema,
14
14
  } from "./destinationcreateawskinesis.js";
15
+ import {
16
+ DestinationCreateAwss3,
17
+ DestinationCreateAwss3$inboundSchema,
18
+ DestinationCreateAwss3$Outbound,
19
+ DestinationCreateAwss3$outboundSchema,
20
+ } from "./destinationcreateawss3.js";
15
21
  import {
16
22
  DestinationCreateAWSSQS,
17
23
  DestinationCreateAWSSQS$inboundSchema,
@@ -48,6 +54,7 @@ export type DestinationCreate =
48
54
  | (DestinationCreateRabbitMQ & { type: "rabbitmq" })
49
55
  | (DestinationCreateAWSKinesis & { type: "aws_kinesis" })
50
56
  | (DestinationCreateAzureServiceBus & { type: "azure_servicebus" })
57
+ | (DestinationCreateAwss3 & { type: "aws_s3" })
51
58
  | (DestinationCreateWebhook & { type: "webhook" })
52
59
  | (DestinationCreateHookdeck & { type: "hookdeck" });
53
60
 
@@ -77,6 +84,11 @@ export const DestinationCreate$inboundSchema: z.ZodType<
77
84
  type: v.type,
78
85
  })),
79
86
  ),
87
+ DestinationCreateAwss3$inboundSchema.and(
88
+ z.object({ type: z.literal("aws_s3") }).transform((v) => ({
89
+ type: v.type,
90
+ })),
91
+ ),
80
92
  DestinationCreateWebhook$inboundSchema.and(
81
93
  z.object({ type: z.literal("webhook") }).transform((v) => ({
82
94
  type: v.type,
@@ -95,6 +107,7 @@ export type DestinationCreate$Outbound =
95
107
  | (DestinationCreateRabbitMQ$Outbound & { type: "rabbitmq" })
96
108
  | (DestinationCreateAWSKinesis$Outbound & { type: "aws_kinesis" })
97
109
  | (DestinationCreateAzureServiceBus$Outbound & { type: "azure_servicebus" })
110
+ | (DestinationCreateAwss3$Outbound & { type: "aws_s3" })
98
111
  | (DestinationCreateWebhook$Outbound & { type: "webhook" })
99
112
  | (DestinationCreateHookdeck$Outbound & { type: "hookdeck" });
100
113
 
@@ -124,6 +137,11 @@ export const DestinationCreate$outboundSchema: z.ZodType<
124
137
  type: v.type,
125
138
  })),
126
139
  ),
140
+ DestinationCreateAwss3$outboundSchema.and(
141
+ z.object({ type: z.literal("aws_s3") }).transform((v) => ({
142
+ type: v.type,
143
+ })),
144
+ ),
127
145
  DestinationCreateWebhook$outboundSchema.and(
128
146
  z.object({ type: z.literal("webhook") }).transform((v) => ({
129
147
  type: v.type,
@@ -0,0 +1,144 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ Awss3Config,
12
+ Awss3Config$inboundSchema,
13
+ Awss3Config$Outbound,
14
+ Awss3Config$outboundSchema,
15
+ } from "./awss3config.js";
16
+ import {
17
+ Awss3Credentials,
18
+ Awss3Credentials$inboundSchema,
19
+ Awss3Credentials$Outbound,
20
+ Awss3Credentials$outboundSchema,
21
+ } from "./awss3credentials.js";
22
+ import {
23
+ Topics,
24
+ Topics$inboundSchema,
25
+ Topics$Outbound,
26
+ Topics$outboundSchema,
27
+ } from "./topics.js";
28
+
29
+ /**
30
+ * Type of the destination. Must be 'aws_s3'.
31
+ */
32
+ export const DestinationCreateAwss3Type = {
33
+ AwsS3: "aws_s3",
34
+ } as const;
35
+ /**
36
+ * Type of the destination. Must be 'aws_s3'.
37
+ */
38
+ export type DestinationCreateAwss3Type = ClosedEnum<
39
+ typeof DestinationCreateAwss3Type
40
+ >;
41
+
42
+ export type DestinationCreateAwss3 = {
43
+ /**
44
+ * Optional user-provided ID. A UUID will be generated if empty.
45
+ */
46
+ id?: string | undefined;
47
+ /**
48
+ * Type of the destination. Must be 'aws_s3'.
49
+ */
50
+ type: DestinationCreateAwss3Type;
51
+ /**
52
+ * "*" or an array of enabled topics.
53
+ */
54
+ topics: Topics;
55
+ config: Awss3Config;
56
+ credentials: Awss3Credentials;
57
+ };
58
+
59
+ /** @internal */
60
+ export const DestinationCreateAwss3Type$inboundSchema: z.ZodNativeEnum<
61
+ typeof DestinationCreateAwss3Type
62
+ > = z.nativeEnum(DestinationCreateAwss3Type);
63
+
64
+ /** @internal */
65
+ export const DestinationCreateAwss3Type$outboundSchema: z.ZodNativeEnum<
66
+ typeof DestinationCreateAwss3Type
67
+ > = DestinationCreateAwss3Type$inboundSchema;
68
+
69
+ /**
70
+ * @internal
71
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
72
+ */
73
+ export namespace DestinationCreateAwss3Type$ {
74
+ /** @deprecated use `DestinationCreateAwss3Type$inboundSchema` instead. */
75
+ export const inboundSchema = DestinationCreateAwss3Type$inboundSchema;
76
+ /** @deprecated use `DestinationCreateAwss3Type$outboundSchema` instead. */
77
+ export const outboundSchema = DestinationCreateAwss3Type$outboundSchema;
78
+ }
79
+
80
+ /** @internal */
81
+ export const DestinationCreateAwss3$inboundSchema: z.ZodType<
82
+ DestinationCreateAwss3,
83
+ z.ZodTypeDef,
84
+ unknown
85
+ > = z.object({
86
+ id: z.string().optional(),
87
+ type: DestinationCreateAwss3Type$inboundSchema,
88
+ topics: Topics$inboundSchema,
89
+ config: Awss3Config$inboundSchema,
90
+ credentials: Awss3Credentials$inboundSchema,
91
+ });
92
+
93
+ /** @internal */
94
+ export type DestinationCreateAwss3$Outbound = {
95
+ id?: string | undefined;
96
+ type: string;
97
+ topics: Topics$Outbound;
98
+ config: Awss3Config$Outbound;
99
+ credentials: Awss3Credentials$Outbound;
100
+ };
101
+
102
+ /** @internal */
103
+ export const DestinationCreateAwss3$outboundSchema: z.ZodType<
104
+ DestinationCreateAwss3$Outbound,
105
+ z.ZodTypeDef,
106
+ DestinationCreateAwss3
107
+ > = z.object({
108
+ id: z.string().optional(),
109
+ type: DestinationCreateAwss3Type$outboundSchema,
110
+ topics: Topics$outboundSchema,
111
+ config: Awss3Config$outboundSchema,
112
+ credentials: Awss3Credentials$outboundSchema,
113
+ });
114
+
115
+ /**
116
+ * @internal
117
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
118
+ */
119
+ export namespace DestinationCreateAwss3$ {
120
+ /** @deprecated use `DestinationCreateAwss3$inboundSchema` instead. */
121
+ export const inboundSchema = DestinationCreateAwss3$inboundSchema;
122
+ /** @deprecated use `DestinationCreateAwss3$outboundSchema` instead. */
123
+ export const outboundSchema = DestinationCreateAwss3$outboundSchema;
124
+ /** @deprecated use `DestinationCreateAwss3$Outbound` instead. */
125
+ export type Outbound = DestinationCreateAwss3$Outbound;
126
+ }
127
+
128
+ export function destinationCreateAwss3ToJSON(
129
+ destinationCreateAwss3: DestinationCreateAwss3,
130
+ ): string {
131
+ return JSON.stringify(
132
+ DestinationCreateAwss3$outboundSchema.parse(destinationCreateAwss3),
133
+ );
134
+ }
135
+
136
+ export function destinationCreateAwss3FromJSON(
137
+ jsonString: string,
138
+ ): SafeParseResult<DestinationCreateAwss3, SDKValidationError> {
139
+ return safeParse(
140
+ jsonString,
141
+ (x) => DestinationCreateAwss3$inboundSchema.parse(JSON.parse(x)),
142
+ `Failed to parse 'DestinationCreateAwss3' from JSON`,
143
+ );
144
+ }
@@ -12,6 +12,12 @@ import {
12
12
  DestinationUpdateAWSKinesis$Outbound,
13
13
  DestinationUpdateAWSKinesis$outboundSchema,
14
14
  } from "./destinationupdateawskinesis.js";
15
+ import {
16
+ DestinationUpdateAwss3,
17
+ DestinationUpdateAwss3$inboundSchema,
18
+ DestinationUpdateAwss3$Outbound,
19
+ DestinationUpdateAwss3$outboundSchema,
20
+ } from "./destinationupdateawss3.js";
15
21
  import {
16
22
  DestinationUpdateAWSSQS,
17
23
  DestinationUpdateAWSSQS$inboundSchema,
@@ -42,7 +48,8 @@ export type DestinationUpdate =
42
48
  | DestinationUpdateAWSSQS
43
49
  | DestinationUpdateRabbitMQ
44
50
  | DestinationUpdateHookdeck
45
- | DestinationUpdateAWSKinesis;
51
+ | DestinationUpdateAWSKinesis
52
+ | DestinationUpdateAwss3;
46
53
 
47
54
  /** @internal */
48
55
  export const DestinationUpdate$inboundSchema: z.ZodType<
@@ -55,6 +62,7 @@ export const DestinationUpdate$inboundSchema: z.ZodType<
55
62
  DestinationUpdateRabbitMQ$inboundSchema,
56
63
  DestinationUpdateHookdeck$inboundSchema,
57
64
  DestinationUpdateAWSKinesis$inboundSchema,
65
+ DestinationUpdateAwss3$inboundSchema,
58
66
  ]);
59
67
 
60
68
  /** @internal */
@@ -63,7 +71,8 @@ export type DestinationUpdate$Outbound =
63
71
  | DestinationUpdateAWSSQS$Outbound
64
72
  | DestinationUpdateRabbitMQ$Outbound
65
73
  | DestinationUpdateHookdeck$Outbound
66
- | DestinationUpdateAWSKinesis$Outbound;
74
+ | DestinationUpdateAWSKinesis$Outbound
75
+ | DestinationUpdateAwss3$Outbound;
67
76
 
68
77
  /** @internal */
69
78
  export const DestinationUpdate$outboundSchema: z.ZodType<
@@ -76,6 +85,7 @@ export const DestinationUpdate$outboundSchema: z.ZodType<
76
85
  DestinationUpdateRabbitMQ$outboundSchema,
77
86
  DestinationUpdateHookdeck$outboundSchema,
78
87
  DestinationUpdateAWSKinesis$outboundSchema,
88
+ DestinationUpdateAwss3$outboundSchema,
79
89
  ]);
80
90
 
81
91
  /**
@@ -0,0 +1,95 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ Awss3Config,
11
+ Awss3Config$inboundSchema,
12
+ Awss3Config$Outbound,
13
+ Awss3Config$outboundSchema,
14
+ } from "./awss3config.js";
15
+ import {
16
+ Awss3Credentials,
17
+ Awss3Credentials$inboundSchema,
18
+ Awss3Credentials$Outbound,
19
+ Awss3Credentials$outboundSchema,
20
+ } from "./awss3credentials.js";
21
+ import {
22
+ Topics,
23
+ Topics$inboundSchema,
24
+ Topics$Outbound,
25
+ Topics$outboundSchema,
26
+ } from "./topics.js";
27
+
28
+ export type DestinationUpdateAwss3 = {
29
+ /**
30
+ * "*" or an array of enabled topics.
31
+ */
32
+ topics?: Topics | undefined;
33
+ config?: Awss3Config | undefined;
34
+ credentials?: Awss3Credentials | undefined;
35
+ };
36
+
37
+ /** @internal */
38
+ export const DestinationUpdateAwss3$inboundSchema: z.ZodType<
39
+ DestinationUpdateAwss3,
40
+ z.ZodTypeDef,
41
+ unknown
42
+ > = z.object({
43
+ topics: Topics$inboundSchema.optional(),
44
+ config: Awss3Config$inboundSchema.optional(),
45
+ credentials: Awss3Credentials$inboundSchema.optional(),
46
+ });
47
+
48
+ /** @internal */
49
+ export type DestinationUpdateAwss3$Outbound = {
50
+ topics?: Topics$Outbound | undefined;
51
+ config?: Awss3Config$Outbound | undefined;
52
+ credentials?: Awss3Credentials$Outbound | undefined;
53
+ };
54
+
55
+ /** @internal */
56
+ export const DestinationUpdateAwss3$outboundSchema: z.ZodType<
57
+ DestinationUpdateAwss3$Outbound,
58
+ z.ZodTypeDef,
59
+ DestinationUpdateAwss3
60
+ > = z.object({
61
+ topics: Topics$outboundSchema.optional(),
62
+ config: Awss3Config$outboundSchema.optional(),
63
+ credentials: Awss3Credentials$outboundSchema.optional(),
64
+ });
65
+
66
+ /**
67
+ * @internal
68
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
69
+ */
70
+ export namespace DestinationUpdateAwss3$ {
71
+ /** @deprecated use `DestinationUpdateAwss3$inboundSchema` instead. */
72
+ export const inboundSchema = DestinationUpdateAwss3$inboundSchema;
73
+ /** @deprecated use `DestinationUpdateAwss3$outboundSchema` instead. */
74
+ export const outboundSchema = DestinationUpdateAwss3$outboundSchema;
75
+ /** @deprecated use `DestinationUpdateAwss3$Outbound` instead. */
76
+ export type Outbound = DestinationUpdateAwss3$Outbound;
77
+ }
78
+
79
+ export function destinationUpdateAwss3ToJSON(
80
+ destinationUpdateAwss3: DestinationUpdateAwss3,
81
+ ): string {
82
+ return JSON.stringify(
83
+ DestinationUpdateAwss3$outboundSchema.parse(destinationUpdateAwss3),
84
+ );
85
+ }
86
+
87
+ export function destinationUpdateAwss3FromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<DestinationUpdateAwss3, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => DestinationUpdateAwss3$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'DestinationUpdateAwss3' from JSON`,
94
+ );
95
+ }
@@ -4,6 +4,8 @@
4
4
 
5
5
  export * from "./awskinesisconfig.js";
6
6
  export * from "./awskinesiscredentials.js";
7
+ export * from "./awss3config.js";
8
+ export * from "./awss3credentials.js";
7
9
  export * from "./awssqsconfig.js";
8
10
  export * from "./awssqscredentials.js";
9
11
  export * from "./azureservicebusconfig.js";
@@ -11,10 +13,12 @@ export * from "./azureservicebuscredentials.js";
11
13
  export * from "./deliveryattempt.js";
12
14
  export * from "./destination.js";
13
15
  export * from "./destinationawskinesis.js";
16
+ export * from "./destinationawss3.js";
14
17
  export * from "./destinationawssqs.js";
15
18
  export * from "./destinationazureservicebus.js";
16
19
  export * from "./destinationcreate.js";
17
20
  export * from "./destinationcreateawskinesis.js";
21
+ export * from "./destinationcreateawss3.js";
18
22
  export * from "./destinationcreateawssqs.js";
19
23
  export * from "./destinationcreateazureservicebus.js";
20
24
  export * from "./destinationcreatehookdeck.js";
@@ -26,6 +30,7 @@ export * from "./destinationschemafield.js";
26
30
  export * from "./destinationtypeschema.js";
27
31
  export * from "./destinationupdate.js";
28
32
  export * from "./destinationupdateawskinesis.js";
33
+ export * from "./destinationupdateawss3.js";
29
34
  export * from "./destinationupdateawssqs.js";
30
35
  export * from "./destinationupdatehookdeck.js";
31
36
  export * from "./destinationupdaterabbitmq.js";
@@ -17,6 +17,7 @@ export const GetDestinationTypeSchemaType = {
17
17
  Rabbitmq: "rabbitmq",
18
18
  Hookdeck: "hookdeck",
19
19
  AwsKinesis: "aws_kinesis",
20
+ AwsS3: "aws_s3",
20
21
  } as const;
21
22
  /**
22
23
  * The type of the destination.