svix 2.2.0 → 2.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.
- package/dist/index.d.mts +1039 -604
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4410 -3642
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/destination.ts +133 -0
- package/src/api/destinationTransformation.ts +55 -0
- package/src/api_internal/destination.ts +12 -0
- package/src/api_internal/destinationAutoconfig.ts +27 -0
- package/src/api_internal/endpoint.ts +8 -3
- package/src/api_internal/{endpointAutoConfig.ts → endpointAutoConfigDeprecated.ts} +1 -1
- package/src/api_internal/endpointAutoconfig.ts +50 -0
- package/src/autoconfig.test.ts +169 -4
- package/src/autoconfig.ts +89 -26
- package/src/autoconfigConsumer.ts +90 -16
- package/src/index.ts +5 -0
- package/src/models/autoConfigSubscriptionOut.ts +38 -0
- package/src/models/destinationIn.ts +303 -0
- package/src/models/destinationOut.ts +295 -0
- package/src/models/destinationPatch.ts +302 -0
- package/src/models/destinationStatus.ts +18 -0
- package/src/models/destinationStatusIn.ts +16 -0
- package/src/models/destinationTransformIn.ts +19 -0
- package/src/models/destinationTransformationOut.ts +22 -0
- package/src/models/fifoEndpointConfigIn.ts +25 -0
- package/src/models/index.ts +14 -0
- package/src/models/ingestSourceIn.ts +12 -0
- package/src/models/ingestSourceOut.ts +12 -0
- package/src/models/listResponseDestinationOut.ts +31 -0
- package/src/models/mergeConfig.ts +19 -0
- package/src/models/mergeConfigOut.ts +15 -0
- package/src/models/postgresConfigIn.ts +44 -0
- package/src/models/postgresConfigOut.ts +25 -0
- package/src/models/postgresConfigPatch.ts +28 -0
- package/src/models/s3ConfigIn.ts +15 -3
- package/src/models/s3ConfigOut.ts +7 -1
- package/src/models/s3ConfigPatch.ts +6 -0
- package/src/models/status.ts +16 -0
- package/src/models/streamSinkIn.ts +12 -0
- package/src/models/streamSinkOut.ts +27 -0
- package/src/models/streamSinkPatch.ts +15 -0
- package/src/request.ts +1 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
import {
|
|
3
|
+
type AzureBlobStorageConfigOut,
|
|
4
|
+
AzureBlobStorageConfigOutSerializer,
|
|
5
|
+
} from "./azureBlobStorageConfigOut";
|
|
6
|
+
import { type BigQueryConfigOut, BigQueryConfigOutSerializer } from "./bigQueryConfigOut";
|
|
7
|
+
import {
|
|
8
|
+
type ClickhouseConfigOut,
|
|
9
|
+
ClickhouseConfigOutSerializer,
|
|
10
|
+
} from "./clickhouseConfigOut";
|
|
11
|
+
import { type DestinationStatus, DestinationStatusSerializer } from "./destinationStatus";
|
|
12
|
+
import {
|
|
13
|
+
type EventBridgeConfigOut,
|
|
14
|
+
EventBridgeConfigOutSerializer,
|
|
15
|
+
} from "./eventBridgeConfigOut";
|
|
16
|
+
import {
|
|
17
|
+
type GoogleCloudPubSubConfigOut,
|
|
18
|
+
GoogleCloudPubSubConfigOutSerializer,
|
|
19
|
+
} from "./googleCloudPubSubConfigOut";
|
|
20
|
+
import {
|
|
21
|
+
type GoogleCloudStorageConfigOut,
|
|
22
|
+
GoogleCloudStorageConfigOutSerializer,
|
|
23
|
+
} from "./googleCloudStorageConfigOut";
|
|
24
|
+
import {
|
|
25
|
+
type OtelTracingConfigOut,
|
|
26
|
+
OtelTracingConfigOutSerializer,
|
|
27
|
+
} from "./otelTracingConfigOut";
|
|
28
|
+
import { type PostgresConfigOut, PostgresConfigOutSerializer } from "./postgresConfigOut";
|
|
29
|
+
import { type RabbitMqConfigOut, RabbitMqConfigOutSerializer } from "./rabbitMqConfigOut";
|
|
30
|
+
import { type RedshiftConfigOut, RedshiftConfigOutSerializer } from "./redshiftConfigOut";
|
|
31
|
+
import { type S3ConfigOut, S3ConfigOutSerializer } from "./s3ConfigOut";
|
|
32
|
+
import { type SinkHttpConfigOut, SinkHttpConfigOutSerializer } from "./sinkHttpConfigOut";
|
|
33
|
+
import {
|
|
34
|
+
type SnowflakeConfigOut,
|
|
35
|
+
SnowflakeConfigOutSerializer,
|
|
36
|
+
} from "./snowflakeConfigOut";
|
|
37
|
+
import { type SnsConfigOut, SnsConfigOutSerializer } from "./snsConfigOut";
|
|
38
|
+
import { type SqsConfigOut, SqsConfigOutSerializer } from "./sqsConfigOut";
|
|
39
|
+
|
|
40
|
+
interface _DestinationOutFields {
|
|
41
|
+
/** The Destination's ID. */
|
|
42
|
+
id: string;
|
|
43
|
+
/** The Destination's UID. */
|
|
44
|
+
uid?: string | null;
|
|
45
|
+
status: DestinationStatus;
|
|
46
|
+
currentIterator: string;
|
|
47
|
+
failureReason?: string | null;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
batchSize: number;
|
|
51
|
+
maxWaitSecs: number;
|
|
52
|
+
eventTypes?: string[];
|
|
53
|
+
channels?: string[];
|
|
54
|
+
nextRetryAt?: Date | null;
|
|
55
|
+
metadata: { [key: string]: string };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// biome-ignore lint/suspicious/noEmptyInterface: backwards compat
|
|
59
|
+
interface DestinationOutPollingEndpointConfig {}
|
|
60
|
+
|
|
61
|
+
interface DestinationOutPollingEndpoint {
|
|
62
|
+
type: "pollingEndpoint";
|
|
63
|
+
config?: DestinationOutPollingEndpointConfig;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface DestinationOutAzureBlobStorage {
|
|
67
|
+
type: "azureBlobStorage";
|
|
68
|
+
config: AzureBlobStorageConfigOut;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface DestinationOutOtelTracing {
|
|
72
|
+
type: "otelTracing";
|
|
73
|
+
config: OtelTracingConfigOut;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface DestinationOutFifoEndpoint {
|
|
77
|
+
type: "fifoEndpoint";
|
|
78
|
+
config: SinkHttpConfigOut;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface DestinationOutAmazonS3 {
|
|
82
|
+
type: "amazonS3";
|
|
83
|
+
config: S3ConfigOut;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface DestinationOutSnowflake {
|
|
87
|
+
type: "snowflake";
|
|
88
|
+
config: SnowflakeConfigOut;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface DestinationOutGoogleCloudStorage {
|
|
92
|
+
type: "googleCloudStorage";
|
|
93
|
+
config: GoogleCloudStorageConfigOut;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface DestinationOutGoogleCloudPubSub {
|
|
97
|
+
type: "googleCloudPubSub";
|
|
98
|
+
config: GoogleCloudPubSubConfigOut;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface DestinationOutRedshift {
|
|
102
|
+
type: "redshift";
|
|
103
|
+
config: RedshiftConfigOut;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface DestinationOutBigQuery {
|
|
107
|
+
type: "bigQuery";
|
|
108
|
+
config: BigQueryConfigOut;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
interface DestinationOutClickhouse {
|
|
112
|
+
type: "clickhouse";
|
|
113
|
+
config: ClickhouseConfigOut;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface DestinationOutRabbitMq {
|
|
117
|
+
type: "rabbitMq";
|
|
118
|
+
config: RabbitMqConfigOut;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface DestinationOutSqs {
|
|
122
|
+
type: "sqs";
|
|
123
|
+
config: SqsConfigOut;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface DestinationOutEventBridge {
|
|
127
|
+
type: "eventBridge";
|
|
128
|
+
config: EventBridgeConfigOut;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface DestinationOutSns {
|
|
132
|
+
type: "sns";
|
|
133
|
+
config: SnsConfigOut;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface DestinationOutPostgres {
|
|
137
|
+
type: "postgres";
|
|
138
|
+
config: PostgresConfigOut;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type DestinationOut = _DestinationOutFields &
|
|
142
|
+
(
|
|
143
|
+
| DestinationOutPollingEndpoint
|
|
144
|
+
| DestinationOutAzureBlobStorage
|
|
145
|
+
| DestinationOutOtelTracing
|
|
146
|
+
| DestinationOutFifoEndpoint
|
|
147
|
+
| DestinationOutAmazonS3
|
|
148
|
+
| DestinationOutSnowflake
|
|
149
|
+
| DestinationOutGoogleCloudStorage
|
|
150
|
+
| DestinationOutGoogleCloudPubSub
|
|
151
|
+
| DestinationOutRedshift
|
|
152
|
+
| DestinationOutBigQuery
|
|
153
|
+
| DestinationOutClickhouse
|
|
154
|
+
| DestinationOutRabbitMq
|
|
155
|
+
| DestinationOutSqs
|
|
156
|
+
| DestinationOutEventBridge
|
|
157
|
+
| DestinationOutSns
|
|
158
|
+
| DestinationOutPostgres
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
export const DestinationOutSerializer = {
|
|
162
|
+
_fromJsonObject(object: any): DestinationOut {
|
|
163
|
+
const type = object["type"];
|
|
164
|
+
|
|
165
|
+
function getConfig(type: string): any {
|
|
166
|
+
switch (type) {
|
|
167
|
+
case "pollingEndpoint":
|
|
168
|
+
return {};
|
|
169
|
+
case "azureBlobStorage":
|
|
170
|
+
return AzureBlobStorageConfigOutSerializer._fromJsonObject(object["config"]);
|
|
171
|
+
case "otelTracing":
|
|
172
|
+
return OtelTracingConfigOutSerializer._fromJsonObject(object["config"]);
|
|
173
|
+
case "fifoEndpoint":
|
|
174
|
+
return SinkHttpConfigOutSerializer._fromJsonObject(object["config"]);
|
|
175
|
+
case "amazonS3":
|
|
176
|
+
return S3ConfigOutSerializer._fromJsonObject(object["config"]);
|
|
177
|
+
case "snowflake":
|
|
178
|
+
return SnowflakeConfigOutSerializer._fromJsonObject(object["config"]);
|
|
179
|
+
case "googleCloudStorage":
|
|
180
|
+
return GoogleCloudStorageConfigOutSerializer._fromJsonObject(object["config"]);
|
|
181
|
+
case "googleCloudPubSub":
|
|
182
|
+
return GoogleCloudPubSubConfigOutSerializer._fromJsonObject(object["config"]);
|
|
183
|
+
case "redshift":
|
|
184
|
+
return RedshiftConfigOutSerializer._fromJsonObject(object["config"]);
|
|
185
|
+
case "bigQuery":
|
|
186
|
+
return BigQueryConfigOutSerializer._fromJsonObject(object["config"]);
|
|
187
|
+
case "clickhouse":
|
|
188
|
+
return ClickhouseConfigOutSerializer._fromJsonObject(object["config"]);
|
|
189
|
+
case "rabbitMq":
|
|
190
|
+
return RabbitMqConfigOutSerializer._fromJsonObject(object["config"]);
|
|
191
|
+
case "sqs":
|
|
192
|
+
return SqsConfigOutSerializer._fromJsonObject(object["config"]);
|
|
193
|
+
case "eventBridge":
|
|
194
|
+
return EventBridgeConfigOutSerializer._fromJsonObject(object["config"]);
|
|
195
|
+
case "sns":
|
|
196
|
+
return SnsConfigOutSerializer._fromJsonObject(object["config"]);
|
|
197
|
+
case "postgres":
|
|
198
|
+
return PostgresConfigOutSerializer._fromJsonObject(object["config"]);
|
|
199
|
+
default:
|
|
200
|
+
throw new Error(`Unexpected type: ${type}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return {
|
|
205
|
+
type,
|
|
206
|
+
config: getConfig(type),
|
|
207
|
+
id: object["id"],
|
|
208
|
+
uid: object["uid"],
|
|
209
|
+
status: DestinationStatusSerializer._fromJsonObject(object["status"]),
|
|
210
|
+
currentIterator: object["currentIterator"],
|
|
211
|
+
failureReason: object["failureReason"],
|
|
212
|
+
createdAt: new Date(object["createdAt"]),
|
|
213
|
+
updatedAt: new Date(object["updatedAt"]),
|
|
214
|
+
batchSize: object["batchSize"],
|
|
215
|
+
maxWaitSecs: object["maxWaitSecs"],
|
|
216
|
+
eventTypes: object["eventTypes"],
|
|
217
|
+
channels: object["channels"],
|
|
218
|
+
nextRetryAt: object["nextRetryAt"] ? new Date(object["nextRetryAt"]) : null,
|
|
219
|
+
metadata: object["metadata"],
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
_toJsonObject(self: DestinationOut): any {
|
|
224
|
+
// biome-ignore lint/suspicious/noImplicitAnyLet: the return type needs to be any
|
|
225
|
+
let config;
|
|
226
|
+
switch (self.type) {
|
|
227
|
+
case "pollingEndpoint":
|
|
228
|
+
config = {};
|
|
229
|
+
break;
|
|
230
|
+
case "azureBlobStorage":
|
|
231
|
+
config = AzureBlobStorageConfigOutSerializer._toJsonObject(self.config);
|
|
232
|
+
break;
|
|
233
|
+
case "otelTracing":
|
|
234
|
+
config = OtelTracingConfigOutSerializer._toJsonObject(self.config);
|
|
235
|
+
break;
|
|
236
|
+
case "fifoEndpoint":
|
|
237
|
+
config = SinkHttpConfigOutSerializer._toJsonObject(self.config);
|
|
238
|
+
break;
|
|
239
|
+
case "amazonS3":
|
|
240
|
+
config = S3ConfigOutSerializer._toJsonObject(self.config);
|
|
241
|
+
break;
|
|
242
|
+
case "snowflake":
|
|
243
|
+
config = SnowflakeConfigOutSerializer._toJsonObject(self.config);
|
|
244
|
+
break;
|
|
245
|
+
case "googleCloudStorage":
|
|
246
|
+
config = GoogleCloudStorageConfigOutSerializer._toJsonObject(self.config);
|
|
247
|
+
break;
|
|
248
|
+
case "googleCloudPubSub":
|
|
249
|
+
config = GoogleCloudPubSubConfigOutSerializer._toJsonObject(self.config);
|
|
250
|
+
break;
|
|
251
|
+
case "redshift":
|
|
252
|
+
config = RedshiftConfigOutSerializer._toJsonObject(self.config);
|
|
253
|
+
break;
|
|
254
|
+
case "bigQuery":
|
|
255
|
+
config = BigQueryConfigOutSerializer._toJsonObject(self.config);
|
|
256
|
+
break;
|
|
257
|
+
case "clickhouse":
|
|
258
|
+
config = ClickhouseConfigOutSerializer._toJsonObject(self.config);
|
|
259
|
+
break;
|
|
260
|
+
case "rabbitMq":
|
|
261
|
+
config = RabbitMqConfigOutSerializer._toJsonObject(self.config);
|
|
262
|
+
break;
|
|
263
|
+
case "sqs":
|
|
264
|
+
config = SqsConfigOutSerializer._toJsonObject(self.config);
|
|
265
|
+
break;
|
|
266
|
+
case "eventBridge":
|
|
267
|
+
config = EventBridgeConfigOutSerializer._toJsonObject(self.config);
|
|
268
|
+
break;
|
|
269
|
+
case "sns":
|
|
270
|
+
config = SnsConfigOutSerializer._toJsonObject(self.config);
|
|
271
|
+
break;
|
|
272
|
+
case "postgres":
|
|
273
|
+
config = PostgresConfigOutSerializer._toJsonObject(self.config);
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
return {
|
|
278
|
+
type: self.type,
|
|
279
|
+
config: config,
|
|
280
|
+
id: self.id,
|
|
281
|
+
uid: self.uid,
|
|
282
|
+
status: DestinationStatusSerializer._toJsonObject(self.status),
|
|
283
|
+
currentIterator: self.currentIterator,
|
|
284
|
+
failureReason: self.failureReason,
|
|
285
|
+
createdAt: self.createdAt,
|
|
286
|
+
updatedAt: self.updatedAt,
|
|
287
|
+
batchSize: self.batchSize,
|
|
288
|
+
maxWaitSecs: self.maxWaitSecs,
|
|
289
|
+
eventTypes: self.eventTypes,
|
|
290
|
+
channels: self.channels,
|
|
291
|
+
nextRetryAt: self.nextRetryAt,
|
|
292
|
+
metadata: self.metadata,
|
|
293
|
+
};
|
|
294
|
+
},
|
|
295
|
+
};
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
import {
|
|
3
|
+
type AzureBlobStorageConfigPatch,
|
|
4
|
+
AzureBlobStorageConfigPatchSerializer,
|
|
5
|
+
} from "./azureBlobStorageConfigPatch";
|
|
6
|
+
import {
|
|
7
|
+
type BigQueryConfigPatch,
|
|
8
|
+
BigQueryConfigPatchSerializer,
|
|
9
|
+
} from "./bigQueryConfigPatch";
|
|
10
|
+
import {
|
|
11
|
+
type ClickhouseConfigPatch,
|
|
12
|
+
ClickhouseConfigPatchSerializer,
|
|
13
|
+
} from "./clickhouseConfigPatch";
|
|
14
|
+
import {
|
|
15
|
+
type DestinationStatusIn,
|
|
16
|
+
DestinationStatusInSerializer,
|
|
17
|
+
} from "./destinationStatusIn";
|
|
18
|
+
import {
|
|
19
|
+
type EventBridgeConfigPatch,
|
|
20
|
+
EventBridgeConfigPatchSerializer,
|
|
21
|
+
} from "./eventBridgeConfigPatch";
|
|
22
|
+
import {
|
|
23
|
+
type GoogleCloudPubSubConfigPatch,
|
|
24
|
+
GoogleCloudPubSubConfigPatchSerializer,
|
|
25
|
+
} from "./googleCloudPubSubConfigPatch";
|
|
26
|
+
import {
|
|
27
|
+
type GoogleCloudStorageConfigPatch,
|
|
28
|
+
GoogleCloudStorageConfigPatchSerializer,
|
|
29
|
+
} from "./googleCloudStorageConfigPatch";
|
|
30
|
+
import {
|
|
31
|
+
type OtelTracingConfigPatch,
|
|
32
|
+
OtelTracingConfigPatchSerializer,
|
|
33
|
+
} from "./otelTracingConfigPatch";
|
|
34
|
+
import {
|
|
35
|
+
type PostgresConfigPatch,
|
|
36
|
+
PostgresConfigPatchSerializer,
|
|
37
|
+
} from "./postgresConfigPatch";
|
|
38
|
+
import {
|
|
39
|
+
type RabbitMqConfigPatch,
|
|
40
|
+
RabbitMqConfigPatchSerializer,
|
|
41
|
+
} from "./rabbitMqConfigPatch";
|
|
42
|
+
import {
|
|
43
|
+
type RedshiftConfigPatch,
|
|
44
|
+
RedshiftConfigPatchSerializer,
|
|
45
|
+
} from "./redshiftConfigPatch";
|
|
46
|
+
import { type S3ConfigPatch, S3ConfigPatchSerializer } from "./s3ConfigPatch";
|
|
47
|
+
import {
|
|
48
|
+
type SinkHttpConfigPatch,
|
|
49
|
+
SinkHttpConfigPatchSerializer,
|
|
50
|
+
} from "./sinkHttpConfigPatch";
|
|
51
|
+
import {
|
|
52
|
+
type SnowflakeConfigPatch,
|
|
53
|
+
SnowflakeConfigPatchSerializer,
|
|
54
|
+
} from "./snowflakeConfigPatch";
|
|
55
|
+
import { type SnsConfigPatch, SnsConfigPatchSerializer } from "./snsConfigPatch";
|
|
56
|
+
import { type SqsConfigPatch, SqsConfigPatchSerializer } from "./sqsConfigPatch";
|
|
57
|
+
|
|
58
|
+
interface _DestinationPatchFields {
|
|
59
|
+
/** The Destination's UID. */
|
|
60
|
+
uid?: string | null;
|
|
61
|
+
status?: DestinationStatusIn | null;
|
|
62
|
+
batchSize?: number | null;
|
|
63
|
+
maxWaitSecs?: number | null;
|
|
64
|
+
eventTypes?: string[];
|
|
65
|
+
channels?: string[];
|
|
66
|
+
metadata?: { [key: string]: string };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// biome-ignore lint/suspicious/noEmptyInterface: backwards compat
|
|
70
|
+
interface DestinationPatchPollingEndpointConfig {}
|
|
71
|
+
|
|
72
|
+
interface DestinationPatchPollingEndpoint {
|
|
73
|
+
type: "pollingEndpoint";
|
|
74
|
+
config?: DestinationPatchPollingEndpointConfig;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface DestinationPatchAzureBlobStorage {
|
|
78
|
+
type: "azureBlobStorage";
|
|
79
|
+
config: AzureBlobStorageConfigPatch;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface DestinationPatchOtelTracing {
|
|
83
|
+
type: "otelTracing";
|
|
84
|
+
config: OtelTracingConfigPatch;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface DestinationPatchFifoEndpoint {
|
|
88
|
+
type: "fifoEndpoint";
|
|
89
|
+
config: SinkHttpConfigPatch;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface DestinationPatchAmazonS3 {
|
|
93
|
+
type: "amazonS3";
|
|
94
|
+
config: S3ConfigPatch;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface DestinationPatchGoogleCloudStorage {
|
|
98
|
+
type: "googleCloudStorage";
|
|
99
|
+
config: GoogleCloudStorageConfigPatch;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface DestinationPatchGoogleCloudPubSub {
|
|
103
|
+
type: "googleCloudPubSub";
|
|
104
|
+
config: GoogleCloudPubSubConfigPatch;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface DestinationPatchSqs {
|
|
108
|
+
type: "sqs";
|
|
109
|
+
config: SqsConfigPatch;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface DestinationPatchSns {
|
|
113
|
+
type: "sns";
|
|
114
|
+
config: SnsConfigPatch;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface DestinationPatchBigQuery {
|
|
118
|
+
type: "bigQuery";
|
|
119
|
+
config: BigQueryConfigPatch;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface DestinationPatchClickhouse {
|
|
123
|
+
type: "clickhouse";
|
|
124
|
+
config: ClickhouseConfigPatch;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface DestinationPatchEventBridge {
|
|
128
|
+
type: "eventBridge";
|
|
129
|
+
config: EventBridgeConfigPatch;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
interface DestinationPatchSnowflake {
|
|
133
|
+
type: "snowflake";
|
|
134
|
+
config: SnowflakeConfigPatch;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface DestinationPatchRabbitMq {
|
|
138
|
+
type: "rabbitMq";
|
|
139
|
+
config: RabbitMqConfigPatch;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface DestinationPatchRedshift {
|
|
143
|
+
type: "redshift";
|
|
144
|
+
config: RedshiftConfigPatch;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
interface DestinationPatchPostgres {
|
|
148
|
+
type: "postgres";
|
|
149
|
+
config: PostgresConfigPatch;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export type DestinationPatch = _DestinationPatchFields &
|
|
153
|
+
(
|
|
154
|
+
| DestinationPatchPollingEndpoint
|
|
155
|
+
| DestinationPatchAzureBlobStorage
|
|
156
|
+
| DestinationPatchOtelTracing
|
|
157
|
+
| DestinationPatchFifoEndpoint
|
|
158
|
+
| DestinationPatchAmazonS3
|
|
159
|
+
| DestinationPatchGoogleCloudStorage
|
|
160
|
+
| DestinationPatchGoogleCloudPubSub
|
|
161
|
+
| DestinationPatchSqs
|
|
162
|
+
| DestinationPatchSns
|
|
163
|
+
| DestinationPatchBigQuery
|
|
164
|
+
| DestinationPatchClickhouse
|
|
165
|
+
| DestinationPatchEventBridge
|
|
166
|
+
| DestinationPatchSnowflake
|
|
167
|
+
| DestinationPatchRabbitMq
|
|
168
|
+
| DestinationPatchRedshift
|
|
169
|
+
| DestinationPatchPostgres
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
export const DestinationPatchSerializer = {
|
|
173
|
+
_fromJsonObject(object: any): DestinationPatch {
|
|
174
|
+
const type = object["type"];
|
|
175
|
+
|
|
176
|
+
function getConfig(type: string): any {
|
|
177
|
+
switch (type) {
|
|
178
|
+
case "pollingEndpoint":
|
|
179
|
+
return {};
|
|
180
|
+
case "azureBlobStorage":
|
|
181
|
+
return AzureBlobStorageConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
182
|
+
case "otelTracing":
|
|
183
|
+
return OtelTracingConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
184
|
+
case "fifoEndpoint":
|
|
185
|
+
return SinkHttpConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
186
|
+
case "amazonS3":
|
|
187
|
+
return S3ConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
188
|
+
case "googleCloudStorage":
|
|
189
|
+
return GoogleCloudStorageConfigPatchSerializer._fromJsonObject(
|
|
190
|
+
object["config"]
|
|
191
|
+
);
|
|
192
|
+
case "googleCloudPubSub":
|
|
193
|
+
return GoogleCloudPubSubConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
194
|
+
case "sqs":
|
|
195
|
+
return SqsConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
196
|
+
case "sns":
|
|
197
|
+
return SnsConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
198
|
+
case "bigQuery":
|
|
199
|
+
return BigQueryConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
200
|
+
case "clickhouse":
|
|
201
|
+
return ClickhouseConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
202
|
+
case "eventBridge":
|
|
203
|
+
return EventBridgeConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
204
|
+
case "snowflake":
|
|
205
|
+
return SnowflakeConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
206
|
+
case "rabbitMq":
|
|
207
|
+
return RabbitMqConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
208
|
+
case "redshift":
|
|
209
|
+
return RedshiftConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
210
|
+
case "postgres":
|
|
211
|
+
return PostgresConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
212
|
+
default:
|
|
213
|
+
throw new Error(`Unexpected type: ${type}`);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return {
|
|
218
|
+
type,
|
|
219
|
+
config: getConfig(type),
|
|
220
|
+
uid: object["uid"],
|
|
221
|
+
status:
|
|
222
|
+
object["status"] != null
|
|
223
|
+
? DestinationStatusInSerializer._fromJsonObject(object["status"])
|
|
224
|
+
: undefined,
|
|
225
|
+
batchSize: object["batchSize"],
|
|
226
|
+
maxWaitSecs: object["maxWaitSecs"],
|
|
227
|
+
eventTypes: object["eventTypes"],
|
|
228
|
+
channels: object["channels"],
|
|
229
|
+
metadata: object["metadata"],
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
_toJsonObject(self: DestinationPatch): any {
|
|
234
|
+
// biome-ignore lint/suspicious/noImplicitAnyLet: the return type needs to be any
|
|
235
|
+
let config;
|
|
236
|
+
switch (self.type) {
|
|
237
|
+
case "pollingEndpoint":
|
|
238
|
+
config = {};
|
|
239
|
+
break;
|
|
240
|
+
case "azureBlobStorage":
|
|
241
|
+
config = AzureBlobStorageConfigPatchSerializer._toJsonObject(self.config);
|
|
242
|
+
break;
|
|
243
|
+
case "otelTracing":
|
|
244
|
+
config = OtelTracingConfigPatchSerializer._toJsonObject(self.config);
|
|
245
|
+
break;
|
|
246
|
+
case "fifoEndpoint":
|
|
247
|
+
config = SinkHttpConfigPatchSerializer._toJsonObject(self.config);
|
|
248
|
+
break;
|
|
249
|
+
case "amazonS3":
|
|
250
|
+
config = S3ConfigPatchSerializer._toJsonObject(self.config);
|
|
251
|
+
break;
|
|
252
|
+
case "googleCloudStorage":
|
|
253
|
+
config = GoogleCloudStorageConfigPatchSerializer._toJsonObject(self.config);
|
|
254
|
+
break;
|
|
255
|
+
case "googleCloudPubSub":
|
|
256
|
+
config = GoogleCloudPubSubConfigPatchSerializer._toJsonObject(self.config);
|
|
257
|
+
break;
|
|
258
|
+
case "sqs":
|
|
259
|
+
config = SqsConfigPatchSerializer._toJsonObject(self.config);
|
|
260
|
+
break;
|
|
261
|
+
case "sns":
|
|
262
|
+
config = SnsConfigPatchSerializer._toJsonObject(self.config);
|
|
263
|
+
break;
|
|
264
|
+
case "bigQuery":
|
|
265
|
+
config = BigQueryConfigPatchSerializer._toJsonObject(self.config);
|
|
266
|
+
break;
|
|
267
|
+
case "clickhouse":
|
|
268
|
+
config = ClickhouseConfigPatchSerializer._toJsonObject(self.config);
|
|
269
|
+
break;
|
|
270
|
+
case "eventBridge":
|
|
271
|
+
config = EventBridgeConfigPatchSerializer._toJsonObject(self.config);
|
|
272
|
+
break;
|
|
273
|
+
case "snowflake":
|
|
274
|
+
config = SnowflakeConfigPatchSerializer._toJsonObject(self.config);
|
|
275
|
+
break;
|
|
276
|
+
case "rabbitMq":
|
|
277
|
+
config = RabbitMqConfigPatchSerializer._toJsonObject(self.config);
|
|
278
|
+
break;
|
|
279
|
+
case "redshift":
|
|
280
|
+
config = RedshiftConfigPatchSerializer._toJsonObject(self.config);
|
|
281
|
+
break;
|
|
282
|
+
case "postgres":
|
|
283
|
+
config = PostgresConfigPatchSerializer._toJsonObject(self.config);
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return {
|
|
288
|
+
type: self.type,
|
|
289
|
+
config: config,
|
|
290
|
+
uid: self.uid,
|
|
291
|
+
status:
|
|
292
|
+
self.status != null
|
|
293
|
+
? DestinationStatusInSerializer._toJsonObject(self.status)
|
|
294
|
+
: undefined,
|
|
295
|
+
batchSize: self.batchSize,
|
|
296
|
+
maxWaitSecs: self.maxWaitSecs,
|
|
297
|
+
eventTypes: self.eventTypes,
|
|
298
|
+
channels: self.channels,
|
|
299
|
+
metadata: self.metadata,
|
|
300
|
+
};
|
|
301
|
+
},
|
|
302
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export enum DestinationStatus {
|
|
4
|
+
Enabled = "enabled",
|
|
5
|
+
Paused = "paused",
|
|
6
|
+
Disabled = "disabled",
|
|
7
|
+
Retrying = "retrying",
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const DestinationStatusSerializer = {
|
|
11
|
+
_fromJsonObject(object: any): DestinationStatus {
|
|
12
|
+
return object;
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
_toJsonObject(self: DestinationStatus): any {
|
|
16
|
+
return self;
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export enum DestinationStatusIn {
|
|
4
|
+
Enabled = "enabled",
|
|
5
|
+
Disabled = "disabled",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const DestinationStatusInSerializer = {
|
|
9
|
+
_fromJsonObject(object: any): DestinationStatusIn {
|
|
10
|
+
return object;
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
_toJsonObject(self: DestinationStatusIn): any {
|
|
14
|
+
return self;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface DestinationTransformIn {
|
|
4
|
+
code?: string | null;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const DestinationTransformInSerializer = {
|
|
8
|
+
_fromJsonObject(object: any): DestinationTransformIn {
|
|
9
|
+
return {
|
|
10
|
+
code: object["code"],
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
_toJsonObject(self: DestinationTransformIn): any {
|
|
15
|
+
return {
|
|
16
|
+
code: self.code,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface DestinationTransformationOut {
|
|
4
|
+
code?: string | null;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const DestinationTransformationOutSerializer = {
|
|
9
|
+
_fromJsonObject(object: any): DestinationTransformationOut {
|
|
10
|
+
return {
|
|
11
|
+
code: object["code"],
|
|
12
|
+
enabled: object["enabled"],
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
_toJsonObject(self: DestinationTransformationOut): any {
|
|
17
|
+
return {
|
|
18
|
+
code: self.code,
|
|
19
|
+
enabled: self.enabled,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface FifoEndpointConfigIn {
|
|
4
|
+
url: string;
|
|
5
|
+
headers?: { [key: string]: string };
|
|
6
|
+
key?: string | null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const FifoEndpointConfigInSerializer = {
|
|
10
|
+
_fromJsonObject(object: any): FifoEndpointConfigIn {
|
|
11
|
+
return {
|
|
12
|
+
url: object["url"],
|
|
13
|
+
headers: object["headers"],
|
|
14
|
+
key: object["key"],
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
_toJsonObject(self: FifoEndpointConfigIn): any {
|
|
19
|
+
return {
|
|
20
|
+
url: self.url,
|
|
21
|
+
headers: self.headers,
|
|
22
|
+
key: self.key,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|