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
package/src/models/index.ts
CHANGED
|
@@ -41,6 +41,13 @@ export { type ConnectorUpsertIn } from "./connectorUpsertIn";
|
|
|
41
41
|
export { type CreateStreamEventsIn } from "./createStreamEventsIn";
|
|
42
42
|
export { type CreateStreamEventsOut } from "./createStreamEventsOut";
|
|
43
43
|
export { type CronConfig } from "./cronConfig";
|
|
44
|
+
export { type DestinationIn } from "./destinationIn";
|
|
45
|
+
export { type DestinationOut } from "./destinationOut";
|
|
46
|
+
export { type DestinationPatch } from "./destinationPatch";
|
|
47
|
+
export { DestinationStatus } from "./destinationStatus";
|
|
48
|
+
export { DestinationStatusIn } from "./destinationStatusIn";
|
|
49
|
+
export { type DestinationTransformIn } from "./destinationTransformIn";
|
|
50
|
+
export { type DestinationTransformationOut } from "./destinationTransformationOut";
|
|
44
51
|
export { type DocusignConfig } from "./docusignConfig";
|
|
45
52
|
export { type DocusignConfigOut } from "./docusignConfigOut";
|
|
46
53
|
export { type EasypostConfig } from "./easypostConfig";
|
|
@@ -78,6 +85,7 @@ export { type EventTypeOut } from "./eventTypeOut";
|
|
|
78
85
|
export { type EventTypePatch } from "./eventTypePatch";
|
|
79
86
|
export { type EventTypeUpsertIn } from "./eventTypeUpsertIn";
|
|
80
87
|
export { type ExpungeAllContentsOut } from "./expungeAllContentsOut";
|
|
88
|
+
export { type FifoEndpointConfigIn } from "./fifoEndpointConfigIn";
|
|
81
89
|
export { type GithubConfig } from "./githubConfig";
|
|
82
90
|
export { type GithubConfigOut } from "./githubConfigOut";
|
|
83
91
|
export { type GoogleCloudPubSubConfigIn } from "./googleCloudPubSubConfigIn";
|
|
@@ -108,6 +116,7 @@ export { type IntegrationUpdate } from "./integrationUpdate";
|
|
|
108
116
|
export { type ListResponseApplicationOut } from "./listResponseApplicationOut";
|
|
109
117
|
export { type ListResponseBackgroundTaskOut } from "./listResponseBackgroundTaskOut";
|
|
110
118
|
export { type ListResponseConnectorOut } from "./listResponseConnectorOut";
|
|
119
|
+
export { type ListResponseDestinationOut } from "./listResponseDestinationOut";
|
|
111
120
|
export { type ListResponseEndpointMessageOut } from "./listResponseEndpointMessageOut";
|
|
112
121
|
export { type ListResponseEndpointOut } from "./listResponseEndpointOut";
|
|
113
122
|
export { type ListResponseEventTypeOut } from "./listResponseEventTypeOut";
|
|
@@ -121,6 +130,8 @@ export { type ListResponseOperationalWebhookEndpointOut } from "./listResponseOp
|
|
|
121
130
|
export { type ListResponseStreamEventTypeOut } from "./listResponseStreamEventTypeOut";
|
|
122
131
|
export { type ListResponseStreamOut } from "./listResponseStreamOut";
|
|
123
132
|
export { type ListResponseStreamSinkOut } from "./listResponseStreamSinkOut";
|
|
133
|
+
export { type MergeConfig } from "./mergeConfig";
|
|
134
|
+
export { type MergeConfigOut } from "./mergeConfigOut";
|
|
124
135
|
export { type MessageAttemptOut } from "./messageAttemptOut";
|
|
125
136
|
export { MessageAttemptTriggerType } from "./messageAttemptTriggerType";
|
|
126
137
|
export { type MessageEndpointOut } from "./messageEndpointOut";
|
|
@@ -157,6 +168,9 @@ export { type PollingEndpointMessageOut } from "./pollingEndpointMessageOut";
|
|
|
157
168
|
export { type PollingEndpointOut } from "./pollingEndpointOut";
|
|
158
169
|
export { type PortIoConfig } from "./portIoConfig";
|
|
159
170
|
export { type PortIoConfigOut } from "./portIoConfigOut";
|
|
171
|
+
export { type PostgresConfigIn } from "./postgresConfigIn";
|
|
172
|
+
export { type PostgresConfigOut } from "./postgresConfigOut";
|
|
173
|
+
export { type PostgresConfigPatch } from "./postgresConfigPatch";
|
|
160
174
|
export { type RabbitMqConfigIn } from "./rabbitMqConfigIn";
|
|
161
175
|
export { type RabbitMqConfigOut } from "./rabbitMqConfigOut";
|
|
162
176
|
export { type RabbitMqConfigPatch } from "./rabbitMqConfigPatch";
|
|
@@ -7,6 +7,7 @@ import { type DocusignConfig, DocusignConfigSerializer } from "./docusignConfig"
|
|
|
7
7
|
import { type EasypostConfig, EasypostConfigSerializer } from "./easypostConfig";
|
|
8
8
|
import { type GithubConfig, GithubConfigSerializer } from "./githubConfig";
|
|
9
9
|
import { type HubspotConfig, HubspotConfigSerializer } from "./hubspotConfig";
|
|
10
|
+
import { type MergeConfig, MergeConfigSerializer } from "./mergeConfig";
|
|
10
11
|
import { type MetaConfig, MetaConfigSerializer } from "./metaConfig";
|
|
11
12
|
import { type NangoConfig, NangoConfigSerializer } from "./nangoConfig";
|
|
12
13
|
import { type OpenClawConfig, OpenClawConfigSerializer } from "./openClawConfig";
|
|
@@ -106,6 +107,11 @@ interface IngestSourceInLithic {
|
|
|
106
107
|
config: SvixConfig;
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
interface IngestSourceInMerge {
|
|
111
|
+
type: "merge";
|
|
112
|
+
config: MergeConfig;
|
|
113
|
+
}
|
|
114
|
+
|
|
109
115
|
interface IngestSourceInMeta {
|
|
110
116
|
type: "meta";
|
|
111
117
|
config: MetaConfig;
|
|
@@ -267,6 +273,7 @@ export type IngestSourceIn = _IngestSourceInFields &
|
|
|
267
273
|
| IngestSourceInHubspot
|
|
268
274
|
| IngestSourceInIncidentIo
|
|
269
275
|
| IngestSourceInLithic
|
|
276
|
+
| IngestSourceInMerge
|
|
270
277
|
| IngestSourceInMeta
|
|
271
278
|
| IngestSourceInNango
|
|
272
279
|
| IngestSourceInNash
|
|
@@ -332,6 +339,8 @@ export const IngestSourceInSerializer = {
|
|
|
332
339
|
return SvixConfigSerializer._fromJsonObject(object["config"]);
|
|
333
340
|
case "lithic":
|
|
334
341
|
return SvixConfigSerializer._fromJsonObject(object["config"]);
|
|
342
|
+
case "merge":
|
|
343
|
+
return MergeConfigSerializer._fromJsonObject(object["config"]);
|
|
335
344
|
case "meta":
|
|
336
345
|
return MetaConfigSerializer._fromJsonObject(object["config"]);
|
|
337
346
|
case "nango":
|
|
@@ -450,6 +459,9 @@ export const IngestSourceInSerializer = {
|
|
|
450
459
|
case "lithic":
|
|
451
460
|
config = SvixConfigSerializer._toJsonObject(self.config);
|
|
452
461
|
break;
|
|
462
|
+
case "merge":
|
|
463
|
+
config = MergeConfigSerializer._toJsonObject(self.config);
|
|
464
|
+
break;
|
|
453
465
|
case "meta":
|
|
454
466
|
config = MetaConfigSerializer._toJsonObject(self.config);
|
|
455
467
|
break;
|
|
@@ -16,6 +16,7 @@ import { type DocusignConfigOut, DocusignConfigOutSerializer } from "./docusignC
|
|
|
16
16
|
import { type EasypostConfigOut, EasypostConfigOutSerializer } from "./easypostConfigOut";
|
|
17
17
|
import { type GithubConfigOut, GithubConfigOutSerializer } from "./githubConfigOut";
|
|
18
18
|
import { type HubspotConfigOut, HubspotConfigOutSerializer } from "./hubspotConfigOut";
|
|
19
|
+
import { type MergeConfigOut, MergeConfigOutSerializer } from "./mergeConfigOut";
|
|
19
20
|
import { type MetaConfigOut, MetaConfigOutSerializer } from "./metaConfigOut";
|
|
20
21
|
import { type NangoConfigOut, NangoConfigOutSerializer } from "./nangoConfigOut";
|
|
21
22
|
import { type OpenClawConfigOut, OpenClawConfigOutSerializer } from "./openClawConfigOut";
|
|
@@ -123,6 +124,11 @@ interface IngestSourceOutLithic {
|
|
|
123
124
|
config: SvixConfigOut;
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
interface IngestSourceOutMerge {
|
|
128
|
+
type: "merge";
|
|
129
|
+
config: MergeConfigOut;
|
|
130
|
+
}
|
|
131
|
+
|
|
126
132
|
interface IngestSourceOutMeta {
|
|
127
133
|
type: "meta";
|
|
128
134
|
config: MetaConfigOut;
|
|
@@ -284,6 +290,7 @@ export type IngestSourceOut = _IngestSourceOutFields &
|
|
|
284
290
|
| IngestSourceOutHubspot
|
|
285
291
|
| IngestSourceOutIncidentIo
|
|
286
292
|
| IngestSourceOutLithic
|
|
293
|
+
| IngestSourceOutMerge
|
|
287
294
|
| IngestSourceOutMeta
|
|
288
295
|
| IngestSourceOutNango
|
|
289
296
|
| IngestSourceOutNash
|
|
@@ -349,6 +356,8 @@ export const IngestSourceOutSerializer = {
|
|
|
349
356
|
return SvixConfigOutSerializer._fromJsonObject(object["config"]);
|
|
350
357
|
case "lithic":
|
|
351
358
|
return SvixConfigOutSerializer._fromJsonObject(object["config"]);
|
|
359
|
+
case "merge":
|
|
360
|
+
return MergeConfigOutSerializer._fromJsonObject(object["config"]);
|
|
352
361
|
case "meta":
|
|
353
362
|
return MetaConfigOutSerializer._fromJsonObject(object["config"]);
|
|
354
363
|
case "nango":
|
|
@@ -471,6 +480,9 @@ export const IngestSourceOutSerializer = {
|
|
|
471
480
|
case "lithic":
|
|
472
481
|
config = SvixConfigOutSerializer._toJsonObject(self.config);
|
|
473
482
|
break;
|
|
483
|
+
case "merge":
|
|
484
|
+
config = MergeConfigOutSerializer._toJsonObject(self.config);
|
|
485
|
+
break;
|
|
474
486
|
case "meta":
|
|
475
487
|
config = MetaConfigOutSerializer._toJsonObject(self.config);
|
|
476
488
|
break;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
import { type DestinationOut, DestinationOutSerializer } from "./destinationOut";
|
|
3
|
+
|
|
4
|
+
export interface ListResponseDestinationOut {
|
|
5
|
+
data: DestinationOut[];
|
|
6
|
+
iterator: string | null;
|
|
7
|
+
prevIterator?: string | null;
|
|
8
|
+
done: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const ListResponseDestinationOutSerializer = {
|
|
12
|
+
_fromJsonObject(object: any): ListResponseDestinationOut {
|
|
13
|
+
return {
|
|
14
|
+
data: object["data"].map((item: DestinationOut) =>
|
|
15
|
+
DestinationOutSerializer._fromJsonObject(item)
|
|
16
|
+
),
|
|
17
|
+
iterator: object["iterator"],
|
|
18
|
+
prevIterator: object["prevIterator"],
|
|
19
|
+
done: object["done"],
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
_toJsonObject(self: ListResponseDestinationOut): any {
|
|
24
|
+
return {
|
|
25
|
+
data: self.data.map((item) => DestinationOutSerializer._toJsonObject(item)),
|
|
26
|
+
iterator: self.iterator,
|
|
27
|
+
prevIterator: self.prevIterator,
|
|
28
|
+
done: self.done,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface MergeConfig {
|
|
4
|
+
secret: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const MergeConfigSerializer = {
|
|
8
|
+
_fromJsonObject(object: any): MergeConfig {
|
|
9
|
+
return {
|
|
10
|
+
secret: object["secret"],
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
_toJsonObject(self: MergeConfig): any {
|
|
15
|
+
return {
|
|
16
|
+
secret: self.secret,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
// biome-ignore-all lint/suspicious/noEmptyInterface: backwards compat
|
|
4
|
+
|
|
5
|
+
export interface MergeConfigOut {}
|
|
6
|
+
|
|
7
|
+
export const MergeConfigOutSerializer = {
|
|
8
|
+
_fromJsonObject(_object: any): MergeConfigOut {
|
|
9
|
+
return {};
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
_toJsonObject(_self: MergeConfigOut): any {
|
|
13
|
+
return {};
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface PostgresConfigIn {
|
|
4
|
+
/**
|
|
5
|
+
* PostgreSQL connection URL, e.g. `postgres://user@host:5432/dbname?sslmode=require`.
|
|
6
|
+
*
|
|
7
|
+
* Do NOT embed a password here; use the `password` field instead.
|
|
8
|
+
*/
|
|
9
|
+
url: string;
|
|
10
|
+
/** Password for the connection. */
|
|
11
|
+
password?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Table to insert into. May be schema-qualified (e.g. `public.events`).
|
|
14
|
+
*
|
|
15
|
+
* Quote characters are not supported. Each dot-separated segment is automatically double-quoted when the query is built, so `public.events` becomes `"public"."events"`.
|
|
16
|
+
*/
|
|
17
|
+
tableName: string;
|
|
18
|
+
/**
|
|
19
|
+
* PEM-encoded CA certificate used to verify the Postgres server's TLS certificate.
|
|
20
|
+
*
|
|
21
|
+
* Supply this to trust a private or self-signed CA when connecting with `sslmode=verify-ca` or `sslmode=verify-full`. Without it, only the built-in public roots are trusted.
|
|
22
|
+
*/
|
|
23
|
+
sslRootCert?: string | null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const PostgresConfigInSerializer = {
|
|
27
|
+
_fromJsonObject(object: any): PostgresConfigIn {
|
|
28
|
+
return {
|
|
29
|
+
url: object["url"],
|
|
30
|
+
password: object["password"],
|
|
31
|
+
tableName: object["tableName"],
|
|
32
|
+
sslRootCert: object["sslRootCert"],
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
_toJsonObject(self: PostgresConfigIn): any {
|
|
37
|
+
return {
|
|
38
|
+
url: self.url,
|
|
39
|
+
password: self.password,
|
|
40
|
+
tableName: self.tableName,
|
|
41
|
+
sslRootCert: self.sslRootCert,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface PostgresConfigOut {
|
|
4
|
+
url: string;
|
|
5
|
+
tableName: string;
|
|
6
|
+
sslRootCert?: string | null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const PostgresConfigOutSerializer = {
|
|
10
|
+
_fromJsonObject(object: any): PostgresConfigOut {
|
|
11
|
+
return {
|
|
12
|
+
url: object["url"],
|
|
13
|
+
tableName: object["tableName"],
|
|
14
|
+
sslRootCert: object["sslRootCert"],
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
_toJsonObject(self: PostgresConfigOut): any {
|
|
19
|
+
return {
|
|
20
|
+
url: self.url,
|
|
21
|
+
tableName: self.tableName,
|
|
22
|
+
sslRootCert: self.sslRootCert,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export interface PostgresConfigPatch {
|
|
4
|
+
url?: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
tableName?: string;
|
|
7
|
+
sslRootCert?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const PostgresConfigPatchSerializer = {
|
|
11
|
+
_fromJsonObject(object: any): PostgresConfigPatch {
|
|
12
|
+
return {
|
|
13
|
+
url: object["url"],
|
|
14
|
+
password: object["password"],
|
|
15
|
+
tableName: object["tableName"],
|
|
16
|
+
sslRootCert: object["sslRootCert"],
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
_toJsonObject(self: PostgresConfigPatch): any {
|
|
21
|
+
return {
|
|
22
|
+
url: self.url,
|
|
23
|
+
password: self.password,
|
|
24
|
+
tableName: self.tableName,
|
|
25
|
+
sslRootCert: self.sslRootCert,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
};
|
package/src/models/s3ConfigIn.ts
CHANGED
|
@@ -5,22 +5,30 @@ export interface S3ConfigIn {
|
|
|
5
5
|
/**
|
|
6
6
|
* Access key ID.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Required (along with `secret_access_key`) if `role_arn` is null
|
|
9
9
|
*/
|
|
10
10
|
accessKeyId?: string | null;
|
|
11
11
|
/**
|
|
12
12
|
* Secret access key.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* Required (along with `access_key_id`) if `role_arn` is null
|
|
15
15
|
*/
|
|
16
16
|
secretAccessKey?: string | null;
|
|
17
17
|
/**
|
|
18
|
-
* The region of the
|
|
18
|
+
* The region of the S3 bucket
|
|
19
19
|
*
|
|
20
20
|
* Currently a required field, but marked as optional because we may infer it from other fields in the future.
|
|
21
21
|
*/
|
|
22
22
|
region?: string | null;
|
|
23
23
|
endpointUrl?: string | null;
|
|
24
|
+
/** Role ARN for delegated authentication */
|
|
25
|
+
roleArn?: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Shared secret passed as the STS ExternalId.
|
|
28
|
+
*
|
|
29
|
+
* Recommended if `role_arn` is not null.
|
|
30
|
+
*/
|
|
31
|
+
externalId?: string | null;
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
export const S3ConfigInSerializer = {
|
|
@@ -31,6 +39,8 @@ export const S3ConfigInSerializer = {
|
|
|
31
39
|
secretAccessKey: object["secretAccessKey"],
|
|
32
40
|
region: object["region"],
|
|
33
41
|
endpointUrl: object["endpointUrl"],
|
|
42
|
+
roleArn: object["roleArn"],
|
|
43
|
+
externalId: object["externalId"],
|
|
34
44
|
};
|
|
35
45
|
},
|
|
36
46
|
|
|
@@ -41,6 +51,8 @@ export const S3ConfigInSerializer = {
|
|
|
41
51
|
secretAccessKey: self.secretAccessKey,
|
|
42
52
|
region: self.region,
|
|
43
53
|
endpointUrl: self.endpointUrl,
|
|
54
|
+
roleArn: self.roleArn,
|
|
55
|
+
externalId: self.externalId,
|
|
44
56
|
};
|
|
45
57
|
},
|
|
46
58
|
};
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
export interface S3ConfigOut {
|
|
4
4
|
bucket: string;
|
|
5
|
-
accessKeyId
|
|
5
|
+
accessKeyId?: string | null;
|
|
6
6
|
region: string;
|
|
7
7
|
endpointUrl?: string | null;
|
|
8
|
+
roleArn?: string | null;
|
|
9
|
+
externalId?: string | null;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
export const S3ConfigOutSerializer = {
|
|
@@ -14,6 +16,8 @@ export const S3ConfigOutSerializer = {
|
|
|
14
16
|
accessKeyId: object["accessKeyId"],
|
|
15
17
|
region: object["region"],
|
|
16
18
|
endpointUrl: object["endpointUrl"],
|
|
19
|
+
roleArn: object["roleArn"],
|
|
20
|
+
externalId: object["externalId"],
|
|
17
21
|
};
|
|
18
22
|
},
|
|
19
23
|
|
|
@@ -23,6 +27,8 @@ export const S3ConfigOutSerializer = {
|
|
|
23
27
|
accessKeyId: self.accessKeyId,
|
|
24
28
|
region: self.region,
|
|
25
29
|
endpointUrl: self.endpointUrl,
|
|
30
|
+
roleArn: self.roleArn,
|
|
31
|
+
externalId: self.externalId,
|
|
26
32
|
};
|
|
27
33
|
},
|
|
28
34
|
};
|
|
@@ -4,6 +4,8 @@ export interface S3ConfigPatch {
|
|
|
4
4
|
bucket?: string;
|
|
5
5
|
accessKeyId?: string;
|
|
6
6
|
secretAccessKey?: string;
|
|
7
|
+
roleArn?: string;
|
|
8
|
+
externalId?: string;
|
|
7
9
|
region?: string;
|
|
8
10
|
endpointUrl?: string;
|
|
9
11
|
}
|
|
@@ -14,6 +16,8 @@ export const S3ConfigPatchSerializer = {
|
|
|
14
16
|
bucket: object["bucket"],
|
|
15
17
|
accessKeyId: object["accessKeyId"],
|
|
16
18
|
secretAccessKey: object["secretAccessKey"],
|
|
19
|
+
roleArn: object["roleArn"],
|
|
20
|
+
externalId: object["externalId"],
|
|
17
21
|
region: object["region"],
|
|
18
22
|
endpointUrl: object["endpointUrl"],
|
|
19
23
|
};
|
|
@@ -24,6 +28,8 @@ export const S3ConfigPatchSerializer = {
|
|
|
24
28
|
bucket: self.bucket,
|
|
25
29
|
accessKeyId: self.accessKeyId,
|
|
26
30
|
secretAccessKey: self.secretAccessKey,
|
|
31
|
+
roleArn: self.roleArn,
|
|
32
|
+
externalId: self.externalId,
|
|
27
33
|
region: self.region,
|
|
28
34
|
endpointUrl: self.endpointUrl,
|
|
29
35
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// this file is @generated
|
|
2
|
+
|
|
3
|
+
export enum Status {
|
|
4
|
+
Pending = "pending",
|
|
5
|
+
Active = "active",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const StatusSerializer = {
|
|
9
|
+
_fromJsonObject(object: any): Status {
|
|
10
|
+
return object;
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
_toJsonObject(self: Status): any {
|
|
14
|
+
return self;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
type OtelTracingConfigIn,
|
|
25
25
|
OtelTracingConfigInSerializer,
|
|
26
26
|
} from "./otelTracingConfigIn";
|
|
27
|
+
import { type PostgresConfigIn, PostgresConfigInSerializer } from "./postgresConfigIn";
|
|
27
28
|
import { type RabbitMqConfigIn, RabbitMqConfigInSerializer } from "./rabbitMqConfigIn";
|
|
28
29
|
import { type RedshiftConfigIn, RedshiftConfigInSerializer } from "./redshiftConfigIn";
|
|
29
30
|
import { type S3ConfigIn, S3ConfigInSerializer } from "./s3ConfigIn";
|
|
@@ -138,6 +139,11 @@ interface StreamSinkInRedshift {
|
|
|
138
139
|
config: RedshiftConfigIn;
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
interface StreamSinkInPostgres {
|
|
143
|
+
type: "postgres";
|
|
144
|
+
config: PostgresConfigIn;
|
|
145
|
+
}
|
|
146
|
+
|
|
141
147
|
export type StreamSinkIn = _StreamSinkInFields &
|
|
142
148
|
(
|
|
143
149
|
| StreamSinkInPoller
|
|
@@ -155,6 +161,7 @@ export type StreamSinkIn = _StreamSinkInFields &
|
|
|
155
161
|
| StreamSinkInSnowflake
|
|
156
162
|
| StreamSinkInRabbitMq
|
|
157
163
|
| StreamSinkInRedshift
|
|
164
|
+
| StreamSinkInPostgres
|
|
158
165
|
);
|
|
159
166
|
|
|
160
167
|
export const StreamSinkInSerializer = {
|
|
@@ -193,6 +200,8 @@ export const StreamSinkInSerializer = {
|
|
|
193
200
|
return RabbitMqConfigInSerializer._fromJsonObject(object["config"]);
|
|
194
201
|
case "redshift":
|
|
195
202
|
return RedshiftConfigInSerializer._fromJsonObject(object["config"]);
|
|
203
|
+
case "postgres":
|
|
204
|
+
return PostgresConfigInSerializer._fromJsonObject(object["config"]);
|
|
196
205
|
default:
|
|
197
206
|
throw new Error(`Unexpected type: ${type}`);
|
|
198
207
|
}
|
|
@@ -263,6 +272,9 @@ export const StreamSinkInSerializer = {
|
|
|
263
272
|
case "redshift":
|
|
264
273
|
config = RedshiftConfigInSerializer._toJsonObject(self.config);
|
|
265
274
|
break;
|
|
275
|
+
case "postgres":
|
|
276
|
+
config = PostgresConfigInSerializer._toJsonObject(self.config);
|
|
277
|
+
break;
|
|
266
278
|
}
|
|
267
279
|
|
|
268
280
|
return {
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
type OtelTracingConfigOut,
|
|
25
25
|
OtelTracingConfigOutSerializer,
|
|
26
26
|
} from "./otelTracingConfigOut";
|
|
27
|
+
import { type PostgresConfigOut, PostgresConfigOutSerializer } from "./postgresConfigOut";
|
|
27
28
|
import { type RabbitMqConfigOut, RabbitMqConfigOutSerializer } from "./rabbitMqConfigOut";
|
|
28
29
|
import { type RedshiftConfigOut, RedshiftConfigOutSerializer } from "./redshiftConfigOut";
|
|
29
30
|
import { type S3ConfigOut, S3ConfigOutSerializer } from "./s3ConfigOut";
|
|
@@ -57,11 +58,19 @@ interface _StreamSinkOutFields {
|
|
|
57
58
|
// biome-ignore lint/suspicious/noEmptyInterface: backwards compat
|
|
58
59
|
interface StreamSinkOutPollerConfig {}
|
|
59
60
|
|
|
61
|
+
// biome-ignore lint/suspicious/noEmptyInterface: backwards compat
|
|
62
|
+
interface StreamSinkOutPollingEndpointConfig {}
|
|
63
|
+
|
|
60
64
|
interface StreamSinkOutPoller {
|
|
61
65
|
type: "poller";
|
|
62
66
|
config?: StreamSinkOutPollerConfig;
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
interface StreamSinkOutPollingEndpoint {
|
|
70
|
+
type: "pollingEndpoint";
|
|
71
|
+
config?: StreamSinkOutPollingEndpointConfig;
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
interface StreamSinkOutAzureBlobStorage {
|
|
66
75
|
type: "azureBlobStorage";
|
|
67
76
|
config: AzureBlobStorageConfigOut;
|
|
@@ -132,9 +141,15 @@ interface StreamSinkOutSns {
|
|
|
132
141
|
config: SnsConfigOut;
|
|
133
142
|
}
|
|
134
143
|
|
|
144
|
+
interface StreamSinkOutPostgres {
|
|
145
|
+
type: "postgres";
|
|
146
|
+
config: PostgresConfigOut;
|
|
147
|
+
}
|
|
148
|
+
|
|
135
149
|
export type StreamSinkOut = _StreamSinkOutFields &
|
|
136
150
|
(
|
|
137
151
|
| StreamSinkOutPoller
|
|
152
|
+
| StreamSinkOutPollingEndpoint
|
|
138
153
|
| StreamSinkOutAzureBlobStorage
|
|
139
154
|
| StreamSinkOutOtelTracing
|
|
140
155
|
| StreamSinkOutHttp
|
|
@@ -149,6 +164,7 @@ export type StreamSinkOut = _StreamSinkOutFields &
|
|
|
149
164
|
| StreamSinkOutSqs
|
|
150
165
|
| StreamSinkOutEventBridge
|
|
151
166
|
| StreamSinkOutSns
|
|
167
|
+
| StreamSinkOutPostgres
|
|
152
168
|
);
|
|
153
169
|
|
|
154
170
|
export const StreamSinkOutSerializer = {
|
|
@@ -159,6 +175,9 @@ export const StreamSinkOutSerializer = {
|
|
|
159
175
|
switch (type) {
|
|
160
176
|
case "poller":
|
|
161
177
|
return {};
|
|
178
|
+
|
|
179
|
+
case "pollingEndpoint":
|
|
180
|
+
return {};
|
|
162
181
|
case "azureBlobStorage":
|
|
163
182
|
return AzureBlobStorageConfigOutSerializer._fromJsonObject(object["config"]);
|
|
164
183
|
case "otelTracing":
|
|
@@ -187,6 +206,8 @@ export const StreamSinkOutSerializer = {
|
|
|
187
206
|
return EventBridgeConfigOutSerializer._fromJsonObject(object["config"]);
|
|
188
207
|
case "sns":
|
|
189
208
|
return SnsConfigOutSerializer._fromJsonObject(object["config"]);
|
|
209
|
+
case "postgres":
|
|
210
|
+
return PostgresConfigOutSerializer._fromJsonObject(object["config"]);
|
|
190
211
|
default:
|
|
191
212
|
throw new Error(`Unexpected type: ${type}`);
|
|
192
213
|
}
|
|
@@ -218,6 +239,9 @@ export const StreamSinkOutSerializer = {
|
|
|
218
239
|
case "poller":
|
|
219
240
|
config = {};
|
|
220
241
|
break;
|
|
242
|
+
case "pollingEndpoint":
|
|
243
|
+
config = {};
|
|
244
|
+
break;
|
|
221
245
|
case "azureBlobStorage":
|
|
222
246
|
config = AzureBlobStorageConfigOutSerializer._toJsonObject(self.config);
|
|
223
247
|
break;
|
|
@@ -260,6 +284,9 @@ export const StreamSinkOutSerializer = {
|
|
|
260
284
|
case "sns":
|
|
261
285
|
config = SnsConfigOutSerializer._toJsonObject(self.config);
|
|
262
286
|
break;
|
|
287
|
+
case "postgres":
|
|
288
|
+
config = PostgresConfigOutSerializer._toJsonObject(self.config);
|
|
289
|
+
break;
|
|
263
290
|
}
|
|
264
291
|
|
|
265
292
|
return {
|
|
@@ -27,6 +27,10 @@ import {
|
|
|
27
27
|
type OtelTracingConfigPatch,
|
|
28
28
|
OtelTracingConfigPatchSerializer,
|
|
29
29
|
} from "./otelTracingConfigPatch";
|
|
30
|
+
import {
|
|
31
|
+
type PostgresConfigPatch,
|
|
32
|
+
PostgresConfigPatchSerializer,
|
|
33
|
+
} from "./postgresConfigPatch";
|
|
30
34
|
import {
|
|
31
35
|
type RabbitMqConfigPatch,
|
|
32
36
|
RabbitMqConfigPatchSerializer,
|
|
@@ -137,6 +141,11 @@ interface StreamSinkPatchRedshift {
|
|
|
137
141
|
config: RedshiftConfigPatch;
|
|
138
142
|
}
|
|
139
143
|
|
|
144
|
+
interface StreamSinkPatchPostgres {
|
|
145
|
+
type: "postgres";
|
|
146
|
+
config: PostgresConfigPatch;
|
|
147
|
+
}
|
|
148
|
+
|
|
140
149
|
export type StreamSinkPatch = _StreamSinkPatchFields &
|
|
141
150
|
(
|
|
142
151
|
| StreamSinkPatchPoller
|
|
@@ -154,6 +163,7 @@ export type StreamSinkPatch = _StreamSinkPatchFields &
|
|
|
154
163
|
| StreamSinkPatchSnowflake
|
|
155
164
|
| StreamSinkPatchRabbitMq
|
|
156
165
|
| StreamSinkPatchRedshift
|
|
166
|
+
| StreamSinkPatchPostgres
|
|
157
167
|
);
|
|
158
168
|
|
|
159
169
|
export const StreamSinkPatchSerializer = {
|
|
@@ -194,6 +204,8 @@ export const StreamSinkPatchSerializer = {
|
|
|
194
204
|
return RabbitMqConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
195
205
|
case "redshift":
|
|
196
206
|
return RedshiftConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
207
|
+
case "postgres":
|
|
208
|
+
return PostgresConfigPatchSerializer._fromJsonObject(object["config"]);
|
|
197
209
|
default:
|
|
198
210
|
throw new Error(`Unexpected type: ${type}`);
|
|
199
211
|
}
|
|
@@ -264,6 +276,9 @@ export const StreamSinkPatchSerializer = {
|
|
|
264
276
|
case "redshift":
|
|
265
277
|
config = RedshiftConfigPatchSerializer._toJsonObject(self.config);
|
|
266
278
|
break;
|
|
279
|
+
case "postgres":
|
|
280
|
+
config = PostgresConfigPatchSerializer._toJsonObject(self.config);
|
|
281
|
+
break;
|
|
267
282
|
}
|
|
268
283
|
|
|
269
284
|
return {
|
package/src/request.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiException, type XOR } from "./util";
|
|
2
2
|
import type { HttpErrorOut, HTTPValidationError } from "./HttpErrors";
|
|
3
3
|
|
|
4
|
-
export const LIB_VERSION = "2.
|
|
4
|
+
export const LIB_VERSION = "2.4.0";
|
|
5
5
|
|
|
6
6
|
function getUserAgent() {
|
|
7
7
|
var fields = [`svix-libs/${LIB_VERSION}/javascript`];
|