@walkeros/server-destination-aws 0.2.1 → 0.3.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 +117 -27
- package/dist/index.d.ts +117 -27
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/schemas.js +1 -0
- package/dist/schemas.js.map +1 -0
- package/dist/schemas.mjs +1 -0
- package/dist/schemas.mjs.map +1 -0
- package/package.json +7 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { DestinationServer } from '@walkeros/server-core';
|
|
2
|
-
import { Destination as Destination$1, Mapping as Mapping$
|
|
2
|
+
import { Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
|
|
3
3
|
import { FirehoseClient, FirehoseClientConfig, PutRecordBatchCommand } from '@aws-sdk/client-firehose';
|
|
4
|
+
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
4
5
|
|
|
5
|
-
interface Settings {
|
|
6
|
+
interface Settings$1 {
|
|
6
7
|
firehose?: FirehoseConfig;
|
|
7
8
|
}
|
|
8
|
-
interface Mapping {
|
|
9
|
+
interface Mapping$1 {
|
|
9
10
|
}
|
|
10
11
|
interface Env extends DestinationServer.Env {
|
|
11
12
|
AWS: {
|
|
@@ -13,19 +14,19 @@ interface Env extends DestinationServer.Env {
|
|
|
13
14
|
PutRecordBatchCommand: typeof PutRecordBatchCommand;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
type Types = Destination$1.Types<Settings, Mapping, Env>;
|
|
17
|
+
type Types = Destination$1.Types<Settings$1, Mapping$1, Env>;
|
|
17
18
|
interface Destination extends DestinationServer.Destination<Types> {
|
|
18
19
|
init: DestinationServer.InitFn<Types>;
|
|
19
20
|
}
|
|
20
21
|
type Config = {
|
|
21
|
-
settings: Settings;
|
|
22
|
+
settings: Settings$1;
|
|
22
23
|
} & DestinationServer.Config<Types>;
|
|
23
24
|
type InitFn = DestinationServer.InitFn<Types>;
|
|
24
25
|
type PushFn = DestinationServer.PushFn<Types>;
|
|
25
26
|
type PartialConfig = DestinationServer.PartialConfig<Types>;
|
|
26
|
-
type PushEvents = DestinationServer.PushEvents<Mapping>;
|
|
27
|
-
type Rule = Mapping$
|
|
28
|
-
type Rules = Mapping$
|
|
27
|
+
type PushEvents = DestinationServer.PushEvents<Mapping$1>;
|
|
28
|
+
type Rule = Mapping$2.Rule<Mapping$1>;
|
|
29
|
+
type Rules = Mapping$2.Rules<Rule>;
|
|
29
30
|
interface FirehoseConfig {
|
|
30
31
|
streamName: string;
|
|
31
32
|
client?: FirehoseClient;
|
|
@@ -33,21 +34,19 @@ interface FirehoseConfig {
|
|
|
33
34
|
config?: FirehoseClientConfig;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
type index$
|
|
37
|
-
type index$
|
|
38
|
-
type index$
|
|
39
|
-
type index$
|
|
40
|
-
type index$
|
|
41
|
-
type index$
|
|
42
|
-
type index$
|
|
43
|
-
type index$
|
|
44
|
-
type index$
|
|
45
|
-
type index$
|
|
46
|
-
type index$
|
|
47
|
-
|
|
48
|
-
type index$
|
|
49
|
-
declare namespace index$2 {
|
|
50
|
-
export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, index$2_FirehoseConfig as FirehoseConfig, index$2_InitFn as InitFn, index$2_Mapping as Mapping, index$2_PartialConfig as PartialConfig, index$2_PushEvents as PushEvents, index$2_PushFn as PushFn, index$2_Rule as Rule, index$2_Rules as Rules, index$2_Settings as Settings, index$2_Types as Types };
|
|
37
|
+
type index$3_Config = Config;
|
|
38
|
+
type index$3_Destination = Destination;
|
|
39
|
+
type index$3_Env = Env;
|
|
40
|
+
type index$3_FirehoseConfig = FirehoseConfig;
|
|
41
|
+
type index$3_InitFn = InitFn;
|
|
42
|
+
type index$3_PartialConfig = PartialConfig;
|
|
43
|
+
type index$3_PushEvents = PushEvents;
|
|
44
|
+
type index$3_PushFn = PushFn;
|
|
45
|
+
type index$3_Rule = Rule;
|
|
46
|
+
type index$3_Rules = Rules;
|
|
47
|
+
type index$3_Types = Types;
|
|
48
|
+
declare namespace index$3 {
|
|
49
|
+
export type { index$3_Config as Config, index$3_Destination as Destination, index$3_Env as Env, index$3_FirehoseConfig as FirehoseConfig, index$3_InitFn as InitFn, Mapping$1 as Mapping, index$3_PartialConfig as PartialConfig, index$3_PushEvents as PushEvents, index$3_PushFn as PushFn, index$3_Rule as Rule, index$3_Rules as Rules, Settings$1 as Settings, index$3_Types as Types };
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
declare const push: Env;
|
|
@@ -57,15 +56,106 @@ declare namespace env {
|
|
|
57
56
|
export { env_push as push };
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
declare const index$
|
|
59
|
+
declare const index$2_env: typeof env;
|
|
60
|
+
declare namespace index$2 {
|
|
61
|
+
export { index$2_env as env };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare const FirehoseConfigSchema: z.ZodObject<{
|
|
65
|
+
streamName: z.ZodString;
|
|
66
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
67
|
+
region: z.ZodOptional<z.ZodString>;
|
|
68
|
+
config: z.ZodOptional<z.ZodAny>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
streamName: string;
|
|
71
|
+
client?: any;
|
|
72
|
+
region?: string | undefined;
|
|
73
|
+
config?: any;
|
|
74
|
+
}, {
|
|
75
|
+
streamName: string;
|
|
76
|
+
client?: any;
|
|
77
|
+
region?: string | undefined;
|
|
78
|
+
config?: any;
|
|
79
|
+
}>;
|
|
80
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
81
|
+
firehose: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
streamName: z.ZodString;
|
|
83
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
84
|
+
region: z.ZodOptional<z.ZodString>;
|
|
85
|
+
config: z.ZodOptional<z.ZodAny>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
streamName: string;
|
|
88
|
+
client?: any;
|
|
89
|
+
region?: string | undefined;
|
|
90
|
+
config?: any;
|
|
91
|
+
}, {
|
|
92
|
+
streamName: string;
|
|
93
|
+
client?: any;
|
|
94
|
+
region?: string | undefined;
|
|
95
|
+
config?: any;
|
|
96
|
+
}>>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
firehose?: {
|
|
99
|
+
streamName: string;
|
|
100
|
+
client?: any;
|
|
101
|
+
region?: string | undefined;
|
|
102
|
+
config?: any;
|
|
103
|
+
} | undefined;
|
|
104
|
+
}, {
|
|
105
|
+
firehose?: {
|
|
106
|
+
streamName: string;
|
|
107
|
+
client?: any;
|
|
108
|
+
region?: string | undefined;
|
|
109
|
+
config?: any;
|
|
110
|
+
} | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* AWS Firehose Mapping Schema
|
|
116
|
+
* AWS Firehose has no event-level mapping configuration
|
|
117
|
+
*/
|
|
118
|
+
declare const MappingSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
119
|
+
/**
|
|
120
|
+
* Type inference from MappingSchema
|
|
121
|
+
*/
|
|
122
|
+
type Mapping = z.infer<typeof MappingSchema>;
|
|
123
|
+
|
|
124
|
+
declare const settings: zod_to_json_schema.JsonSchema7Type & {
|
|
125
|
+
$schema?: string | undefined;
|
|
126
|
+
definitions?: {
|
|
127
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
128
|
+
} | undefined;
|
|
129
|
+
};
|
|
130
|
+
declare const mapping: zod_to_json_schema.JsonSchema7Type & {
|
|
131
|
+
$schema?: string | undefined;
|
|
132
|
+
definitions?: {
|
|
133
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
134
|
+
} | undefined;
|
|
135
|
+
};
|
|
136
|
+
declare const firehose: zod_to_json_schema.JsonSchema7Type & {
|
|
137
|
+
$schema?: string | undefined;
|
|
138
|
+
definitions?: {
|
|
139
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
140
|
+
} | undefined;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare const index$1_FirehoseConfigSchema: typeof FirehoseConfigSchema;
|
|
144
|
+
type index$1_Mapping = Mapping;
|
|
145
|
+
declare const index$1_MappingSchema: typeof MappingSchema;
|
|
146
|
+
type index$1_Settings = Settings;
|
|
147
|
+
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
148
|
+
declare const index$1_firehose: typeof firehose;
|
|
149
|
+
declare const index$1_mapping: typeof mapping;
|
|
150
|
+
declare const index$1_settings: typeof settings;
|
|
61
151
|
declare namespace index$1 {
|
|
62
|
-
export { index$
|
|
152
|
+
export { index$1_FirehoseConfigSchema as FirehoseConfigSchema, type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_firehose as firehose, index$1_mapping as mapping, index$1_settings as settings };
|
|
63
153
|
}
|
|
64
154
|
|
|
65
155
|
declare const destinationFirehose: Destination;
|
|
66
156
|
|
|
67
157
|
declare namespace index {
|
|
68
|
-
export { index$
|
|
158
|
+
export { index$2 as firehose };
|
|
69
159
|
}
|
|
70
160
|
|
|
71
|
-
export { index$
|
|
161
|
+
export { index$3 as DestinationFirehose, destinationFirehose, index as examples, index$1 as schemas };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { DestinationServer } from '@walkeros/server-core';
|
|
2
|
-
import { Destination as Destination$1, Mapping as Mapping$
|
|
2
|
+
import { Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
|
|
3
3
|
import { FirehoseClient, FirehoseClientConfig, PutRecordBatchCommand } from '@aws-sdk/client-firehose';
|
|
4
|
+
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
4
5
|
|
|
5
|
-
interface Settings {
|
|
6
|
+
interface Settings$1 {
|
|
6
7
|
firehose?: FirehoseConfig;
|
|
7
8
|
}
|
|
8
|
-
interface Mapping {
|
|
9
|
+
interface Mapping$1 {
|
|
9
10
|
}
|
|
10
11
|
interface Env extends DestinationServer.Env {
|
|
11
12
|
AWS: {
|
|
@@ -13,19 +14,19 @@ interface Env extends DestinationServer.Env {
|
|
|
13
14
|
PutRecordBatchCommand: typeof PutRecordBatchCommand;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
type Types = Destination$1.Types<Settings, Mapping, Env>;
|
|
17
|
+
type Types = Destination$1.Types<Settings$1, Mapping$1, Env>;
|
|
17
18
|
interface Destination extends DestinationServer.Destination<Types> {
|
|
18
19
|
init: DestinationServer.InitFn<Types>;
|
|
19
20
|
}
|
|
20
21
|
type Config = {
|
|
21
|
-
settings: Settings;
|
|
22
|
+
settings: Settings$1;
|
|
22
23
|
} & DestinationServer.Config<Types>;
|
|
23
24
|
type InitFn = DestinationServer.InitFn<Types>;
|
|
24
25
|
type PushFn = DestinationServer.PushFn<Types>;
|
|
25
26
|
type PartialConfig = DestinationServer.PartialConfig<Types>;
|
|
26
|
-
type PushEvents = DestinationServer.PushEvents<Mapping>;
|
|
27
|
-
type Rule = Mapping$
|
|
28
|
-
type Rules = Mapping$
|
|
27
|
+
type PushEvents = DestinationServer.PushEvents<Mapping$1>;
|
|
28
|
+
type Rule = Mapping$2.Rule<Mapping$1>;
|
|
29
|
+
type Rules = Mapping$2.Rules<Rule>;
|
|
29
30
|
interface FirehoseConfig {
|
|
30
31
|
streamName: string;
|
|
31
32
|
client?: FirehoseClient;
|
|
@@ -33,21 +34,19 @@ interface FirehoseConfig {
|
|
|
33
34
|
config?: FirehoseClientConfig;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
type index$
|
|
37
|
-
type index$
|
|
38
|
-
type index$
|
|
39
|
-
type index$
|
|
40
|
-
type index$
|
|
41
|
-
type index$
|
|
42
|
-
type index$
|
|
43
|
-
type index$
|
|
44
|
-
type index$
|
|
45
|
-
type index$
|
|
46
|
-
type index$
|
|
47
|
-
|
|
48
|
-
type index$
|
|
49
|
-
declare namespace index$2 {
|
|
50
|
-
export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, index$2_FirehoseConfig as FirehoseConfig, index$2_InitFn as InitFn, index$2_Mapping as Mapping, index$2_PartialConfig as PartialConfig, index$2_PushEvents as PushEvents, index$2_PushFn as PushFn, index$2_Rule as Rule, index$2_Rules as Rules, index$2_Settings as Settings, index$2_Types as Types };
|
|
37
|
+
type index$3_Config = Config;
|
|
38
|
+
type index$3_Destination = Destination;
|
|
39
|
+
type index$3_Env = Env;
|
|
40
|
+
type index$3_FirehoseConfig = FirehoseConfig;
|
|
41
|
+
type index$3_InitFn = InitFn;
|
|
42
|
+
type index$3_PartialConfig = PartialConfig;
|
|
43
|
+
type index$3_PushEvents = PushEvents;
|
|
44
|
+
type index$3_PushFn = PushFn;
|
|
45
|
+
type index$3_Rule = Rule;
|
|
46
|
+
type index$3_Rules = Rules;
|
|
47
|
+
type index$3_Types = Types;
|
|
48
|
+
declare namespace index$3 {
|
|
49
|
+
export type { index$3_Config as Config, index$3_Destination as Destination, index$3_Env as Env, index$3_FirehoseConfig as FirehoseConfig, index$3_InitFn as InitFn, Mapping$1 as Mapping, index$3_PartialConfig as PartialConfig, index$3_PushEvents as PushEvents, index$3_PushFn as PushFn, index$3_Rule as Rule, index$3_Rules as Rules, Settings$1 as Settings, index$3_Types as Types };
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
declare const push: Env;
|
|
@@ -57,15 +56,106 @@ declare namespace env {
|
|
|
57
56
|
export { env_push as push };
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
declare const index$
|
|
59
|
+
declare const index$2_env: typeof env;
|
|
60
|
+
declare namespace index$2 {
|
|
61
|
+
export { index$2_env as env };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare const FirehoseConfigSchema: z.ZodObject<{
|
|
65
|
+
streamName: z.ZodString;
|
|
66
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
67
|
+
region: z.ZodOptional<z.ZodString>;
|
|
68
|
+
config: z.ZodOptional<z.ZodAny>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
streamName: string;
|
|
71
|
+
client?: any;
|
|
72
|
+
region?: string | undefined;
|
|
73
|
+
config?: any;
|
|
74
|
+
}, {
|
|
75
|
+
streamName: string;
|
|
76
|
+
client?: any;
|
|
77
|
+
region?: string | undefined;
|
|
78
|
+
config?: any;
|
|
79
|
+
}>;
|
|
80
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
81
|
+
firehose: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
streamName: z.ZodString;
|
|
83
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
84
|
+
region: z.ZodOptional<z.ZodString>;
|
|
85
|
+
config: z.ZodOptional<z.ZodAny>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
streamName: string;
|
|
88
|
+
client?: any;
|
|
89
|
+
region?: string | undefined;
|
|
90
|
+
config?: any;
|
|
91
|
+
}, {
|
|
92
|
+
streamName: string;
|
|
93
|
+
client?: any;
|
|
94
|
+
region?: string | undefined;
|
|
95
|
+
config?: any;
|
|
96
|
+
}>>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
firehose?: {
|
|
99
|
+
streamName: string;
|
|
100
|
+
client?: any;
|
|
101
|
+
region?: string | undefined;
|
|
102
|
+
config?: any;
|
|
103
|
+
} | undefined;
|
|
104
|
+
}, {
|
|
105
|
+
firehose?: {
|
|
106
|
+
streamName: string;
|
|
107
|
+
client?: any;
|
|
108
|
+
region?: string | undefined;
|
|
109
|
+
config?: any;
|
|
110
|
+
} | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* AWS Firehose Mapping Schema
|
|
116
|
+
* AWS Firehose has no event-level mapping configuration
|
|
117
|
+
*/
|
|
118
|
+
declare const MappingSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
119
|
+
/**
|
|
120
|
+
* Type inference from MappingSchema
|
|
121
|
+
*/
|
|
122
|
+
type Mapping = z.infer<typeof MappingSchema>;
|
|
123
|
+
|
|
124
|
+
declare const settings: zod_to_json_schema.JsonSchema7Type & {
|
|
125
|
+
$schema?: string | undefined;
|
|
126
|
+
definitions?: {
|
|
127
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
128
|
+
} | undefined;
|
|
129
|
+
};
|
|
130
|
+
declare const mapping: zod_to_json_schema.JsonSchema7Type & {
|
|
131
|
+
$schema?: string | undefined;
|
|
132
|
+
definitions?: {
|
|
133
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
134
|
+
} | undefined;
|
|
135
|
+
};
|
|
136
|
+
declare const firehose: zod_to_json_schema.JsonSchema7Type & {
|
|
137
|
+
$schema?: string | undefined;
|
|
138
|
+
definitions?: {
|
|
139
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
140
|
+
} | undefined;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare const index$1_FirehoseConfigSchema: typeof FirehoseConfigSchema;
|
|
144
|
+
type index$1_Mapping = Mapping;
|
|
145
|
+
declare const index$1_MappingSchema: typeof MappingSchema;
|
|
146
|
+
type index$1_Settings = Settings;
|
|
147
|
+
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
148
|
+
declare const index$1_firehose: typeof firehose;
|
|
149
|
+
declare const index$1_mapping: typeof mapping;
|
|
150
|
+
declare const index$1_settings: typeof settings;
|
|
61
151
|
declare namespace index$1 {
|
|
62
|
-
export { index$
|
|
152
|
+
export { index$1_FirehoseConfigSchema as FirehoseConfigSchema, type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_firehose as firehose, index$1_mapping as mapping, index$1_settings as settings };
|
|
63
153
|
}
|
|
64
154
|
|
|
65
155
|
declare const destinationFirehose: Destination;
|
|
66
156
|
|
|
67
157
|
declare namespace index {
|
|
68
|
-
export { index$
|
|
158
|
+
export { index$2 as firehose };
|
|
69
159
|
}
|
|
70
160
|
|
|
71
|
-
export { index$
|
|
161
|
+
export { index$3 as DestinationFirehose, destinationFirehose, index as examples, index$1 as schemas };
|