svix 2.3.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 +1012 -640
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4399 -3714
- 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 +162 -3
- package/src/autoconfig.ts +87 -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 +11 -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/s3ConfigIn.ts +1 -1
- package/src/models/status.ts +16 -0
- package/src/models/streamSinkOut.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";
|
|
@@ -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
|
+
};
|
package/src/models/s3ConfigIn.ts
CHANGED
|
@@ -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
|
+
};
|
|
@@ -58,11 +58,19 @@ interface _StreamSinkOutFields {
|
|
|
58
58
|
// biome-ignore lint/suspicious/noEmptyInterface: backwards compat
|
|
59
59
|
interface StreamSinkOutPollerConfig {}
|
|
60
60
|
|
|
61
|
+
// biome-ignore lint/suspicious/noEmptyInterface: backwards compat
|
|
62
|
+
interface StreamSinkOutPollingEndpointConfig {}
|
|
63
|
+
|
|
61
64
|
interface StreamSinkOutPoller {
|
|
62
65
|
type: "poller";
|
|
63
66
|
config?: StreamSinkOutPollerConfig;
|
|
64
67
|
}
|
|
65
68
|
|
|
69
|
+
interface StreamSinkOutPollingEndpoint {
|
|
70
|
+
type: "pollingEndpoint";
|
|
71
|
+
config?: StreamSinkOutPollingEndpointConfig;
|
|
72
|
+
}
|
|
73
|
+
|
|
66
74
|
interface StreamSinkOutAzureBlobStorage {
|
|
67
75
|
type: "azureBlobStorage";
|
|
68
76
|
config: AzureBlobStorageConfigOut;
|
|
@@ -141,6 +149,7 @@ interface StreamSinkOutPostgres {
|
|
|
141
149
|
export type StreamSinkOut = _StreamSinkOutFields &
|
|
142
150
|
(
|
|
143
151
|
| StreamSinkOutPoller
|
|
152
|
+
| StreamSinkOutPollingEndpoint
|
|
144
153
|
| StreamSinkOutAzureBlobStorage
|
|
145
154
|
| StreamSinkOutOtelTracing
|
|
146
155
|
| StreamSinkOutHttp
|
|
@@ -166,6 +175,9 @@ export const StreamSinkOutSerializer = {
|
|
|
166
175
|
switch (type) {
|
|
167
176
|
case "poller":
|
|
168
177
|
return {};
|
|
178
|
+
|
|
179
|
+
case "pollingEndpoint":
|
|
180
|
+
return {};
|
|
169
181
|
case "azureBlobStorage":
|
|
170
182
|
return AzureBlobStorageConfigOutSerializer._fromJsonObject(object["config"]);
|
|
171
183
|
case "otelTracing":
|
|
@@ -227,6 +239,9 @@ export const StreamSinkOutSerializer = {
|
|
|
227
239
|
case "poller":
|
|
228
240
|
config = {};
|
|
229
241
|
break;
|
|
242
|
+
case "pollingEndpoint":
|
|
243
|
+
config = {};
|
|
244
|
+
break;
|
|
230
245
|
case "azureBlobStorage":
|
|
231
246
|
config = AzureBlobStorageConfigOutSerializer._toJsonObject(self.config);
|
|
232
247
|
break;
|
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`];
|