@walkeros/server-destination-gcp 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 +77 -21
- package/dist/index.d.ts +77 -21
- 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.d.mts +18 -0
- package/dist/schemas.d.ts +18 -0
- 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 +14 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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 { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';
|
|
4
|
+
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
4
5
|
|
|
5
|
-
interface Settings {
|
|
6
|
+
interface Settings$1 {
|
|
6
7
|
client: BigQuery;
|
|
7
8
|
projectId: string;
|
|
8
9
|
datasetId: string;
|
|
@@ -10,41 +11,96 @@ interface Settings {
|
|
|
10
11
|
location?: string;
|
|
11
12
|
bigquery?: BigQueryOptions;
|
|
12
13
|
}
|
|
13
|
-
interface Mapping {
|
|
14
|
+
interface Mapping$1 {
|
|
14
15
|
}
|
|
15
16
|
interface Env extends DestinationServer.Env {
|
|
16
17
|
BigQuery?: typeof BigQuery;
|
|
17
18
|
}
|
|
18
|
-
type Types = Destination$1.Types<Settings, Mapping, Env>;
|
|
19
|
+
type Types = Destination$1.Types<Settings$1, Mapping$1, Env>;
|
|
19
20
|
interface Destination extends DestinationServer.Destination<Types> {
|
|
20
21
|
init: DestinationServer.InitFn<Types>;
|
|
21
22
|
}
|
|
22
23
|
type Config = {
|
|
23
|
-
settings: Settings;
|
|
24
|
+
settings: Settings$1;
|
|
24
25
|
} & DestinationServer.Config<Types>;
|
|
25
26
|
type InitFn = DestinationServer.InitFn<Types>;
|
|
26
27
|
type PushFn = DestinationServer.PushFn<Types>;
|
|
27
28
|
type PartialConfig = DestinationServer.PartialConfig<Types>;
|
|
28
|
-
type PushEvents = DestinationServer.PushEvents<Mapping>;
|
|
29
|
-
type Rule = Mapping$
|
|
30
|
-
type Rules = Mapping$
|
|
31
|
-
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type
|
|
35
|
-
type
|
|
29
|
+
type PushEvents = DestinationServer.PushEvents<Mapping$1>;
|
|
30
|
+
type Rule = Mapping$2.Rule<Mapping$1>;
|
|
31
|
+
type Rules = Mapping$2.Rules<Rule>;
|
|
32
|
+
|
|
33
|
+
type index$1_Config = Config;
|
|
34
|
+
type index$1_Destination = Destination;
|
|
35
|
+
type index$1_Env = Env;
|
|
36
|
+
type index$1_InitFn = InitFn;
|
|
37
|
+
type index$1_PartialConfig = PartialConfig;
|
|
38
|
+
type index$1_PushEvents = PushEvents;
|
|
39
|
+
type index$1_PushFn = PushFn;
|
|
40
|
+
type index$1_Rule = Rule;
|
|
41
|
+
type index$1_Rules = Rules;
|
|
42
|
+
type index$1_Types = Types;
|
|
43
|
+
declare namespace index$1 {
|
|
44
|
+
export type { index$1_Config as Config, index$1_Destination as Destination, index$1_Env as Env, index$1_InitFn as InitFn, Mapping$1 as Mapping, index$1_PartialConfig as PartialConfig, index$1_PushEvents as PushEvents, index$1_PushFn as PushFn, index$1_Rule as Rule, index$1_Rules as Rules, Settings$1 as Settings, index$1_Types as Types };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
48
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
49
|
+
projectId: z.ZodString;
|
|
50
|
+
datasetId: z.ZodDefault<z.ZodString>;
|
|
51
|
+
tableId: z.ZodDefault<z.ZodString>;
|
|
52
|
+
location: z.ZodDefault<z.ZodString>;
|
|
53
|
+
bigquery: z.ZodOptional<z.ZodAny>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
projectId: string;
|
|
56
|
+
datasetId: string;
|
|
57
|
+
tableId: string;
|
|
58
|
+
location: string;
|
|
59
|
+
client?: any;
|
|
60
|
+
bigquery?: any;
|
|
61
|
+
}, {
|
|
62
|
+
projectId: string;
|
|
63
|
+
client?: any;
|
|
64
|
+
datasetId?: string | undefined;
|
|
65
|
+
tableId?: string | undefined;
|
|
66
|
+
location?: string | undefined;
|
|
67
|
+
bigquery?: any;
|
|
68
|
+
}>;
|
|
69
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* GCP BigQuery Mapping Schema
|
|
73
|
+
* BigQuery has no event-level mapping configuration
|
|
74
|
+
*/
|
|
75
|
+
declare const MappingSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
76
|
+
/**
|
|
77
|
+
* Type inference from MappingSchema
|
|
78
|
+
*/
|
|
79
|
+
type Mapping = z.infer<typeof MappingSchema>;
|
|
80
|
+
|
|
81
|
+
declare const settings: zod_to_json_schema.JsonSchema7Type & {
|
|
82
|
+
$schema?: string | undefined;
|
|
83
|
+
definitions?: {
|
|
84
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
85
|
+
} | undefined;
|
|
86
|
+
};
|
|
87
|
+
declare const mapping: zod_to_json_schema.JsonSchema7Type & {
|
|
88
|
+
$schema?: string | undefined;
|
|
89
|
+
definitions?: {
|
|
90
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
91
|
+
} | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
36
94
|
type index_Mapping = Mapping;
|
|
37
|
-
|
|
38
|
-
type index_PushEvents = PushEvents;
|
|
39
|
-
type index_PushFn = PushFn;
|
|
40
|
-
type index_Rule = Rule;
|
|
41
|
-
type index_Rules = Rules;
|
|
95
|
+
declare const index_MappingSchema: typeof MappingSchema;
|
|
42
96
|
type index_Settings = Settings;
|
|
43
|
-
|
|
97
|
+
declare const index_SettingsSchema: typeof SettingsSchema;
|
|
98
|
+
declare const index_mapping: typeof mapping;
|
|
99
|
+
declare const index_settings: typeof settings;
|
|
44
100
|
declare namespace index {
|
|
45
|
-
export
|
|
101
|
+
export { type index_Mapping as Mapping, index_MappingSchema as MappingSchema, type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_mapping as mapping, index_settings as settings };
|
|
46
102
|
}
|
|
47
103
|
|
|
48
104
|
declare const destinationBigQuery: Destination;
|
|
49
105
|
|
|
50
|
-
export { index as DestinationBigQuery, destinationBigQuery };
|
|
106
|
+
export { index$1 as DestinationBigQuery, destinationBigQuery, index as schemas };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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 { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';
|
|
4
|
+
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
4
5
|
|
|
5
|
-
interface Settings {
|
|
6
|
+
interface Settings$1 {
|
|
6
7
|
client: BigQuery;
|
|
7
8
|
projectId: string;
|
|
8
9
|
datasetId: string;
|
|
@@ -10,41 +11,96 @@ interface Settings {
|
|
|
10
11
|
location?: string;
|
|
11
12
|
bigquery?: BigQueryOptions;
|
|
12
13
|
}
|
|
13
|
-
interface Mapping {
|
|
14
|
+
interface Mapping$1 {
|
|
14
15
|
}
|
|
15
16
|
interface Env extends DestinationServer.Env {
|
|
16
17
|
BigQuery?: typeof BigQuery;
|
|
17
18
|
}
|
|
18
|
-
type Types = Destination$1.Types<Settings, Mapping, Env>;
|
|
19
|
+
type Types = Destination$1.Types<Settings$1, Mapping$1, Env>;
|
|
19
20
|
interface Destination extends DestinationServer.Destination<Types> {
|
|
20
21
|
init: DestinationServer.InitFn<Types>;
|
|
21
22
|
}
|
|
22
23
|
type Config = {
|
|
23
|
-
settings: Settings;
|
|
24
|
+
settings: Settings$1;
|
|
24
25
|
} & DestinationServer.Config<Types>;
|
|
25
26
|
type InitFn = DestinationServer.InitFn<Types>;
|
|
26
27
|
type PushFn = DestinationServer.PushFn<Types>;
|
|
27
28
|
type PartialConfig = DestinationServer.PartialConfig<Types>;
|
|
28
|
-
type PushEvents = DestinationServer.PushEvents<Mapping>;
|
|
29
|
-
type Rule = Mapping$
|
|
30
|
-
type Rules = Mapping$
|
|
31
|
-
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type
|
|
35
|
-
type
|
|
29
|
+
type PushEvents = DestinationServer.PushEvents<Mapping$1>;
|
|
30
|
+
type Rule = Mapping$2.Rule<Mapping$1>;
|
|
31
|
+
type Rules = Mapping$2.Rules<Rule>;
|
|
32
|
+
|
|
33
|
+
type index$1_Config = Config;
|
|
34
|
+
type index$1_Destination = Destination;
|
|
35
|
+
type index$1_Env = Env;
|
|
36
|
+
type index$1_InitFn = InitFn;
|
|
37
|
+
type index$1_PartialConfig = PartialConfig;
|
|
38
|
+
type index$1_PushEvents = PushEvents;
|
|
39
|
+
type index$1_PushFn = PushFn;
|
|
40
|
+
type index$1_Rule = Rule;
|
|
41
|
+
type index$1_Rules = Rules;
|
|
42
|
+
type index$1_Types = Types;
|
|
43
|
+
declare namespace index$1 {
|
|
44
|
+
export type { index$1_Config as Config, index$1_Destination as Destination, index$1_Env as Env, index$1_InitFn as InitFn, Mapping$1 as Mapping, index$1_PartialConfig as PartialConfig, index$1_PushEvents as PushEvents, index$1_PushFn as PushFn, index$1_Rule as Rule, index$1_Rules as Rules, Settings$1 as Settings, index$1_Types as Types };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
48
|
+
client: z.ZodOptional<z.ZodAny>;
|
|
49
|
+
projectId: z.ZodString;
|
|
50
|
+
datasetId: z.ZodDefault<z.ZodString>;
|
|
51
|
+
tableId: z.ZodDefault<z.ZodString>;
|
|
52
|
+
location: z.ZodDefault<z.ZodString>;
|
|
53
|
+
bigquery: z.ZodOptional<z.ZodAny>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
projectId: string;
|
|
56
|
+
datasetId: string;
|
|
57
|
+
tableId: string;
|
|
58
|
+
location: string;
|
|
59
|
+
client?: any;
|
|
60
|
+
bigquery?: any;
|
|
61
|
+
}, {
|
|
62
|
+
projectId: string;
|
|
63
|
+
client?: any;
|
|
64
|
+
datasetId?: string | undefined;
|
|
65
|
+
tableId?: string | undefined;
|
|
66
|
+
location?: string | undefined;
|
|
67
|
+
bigquery?: any;
|
|
68
|
+
}>;
|
|
69
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* GCP BigQuery Mapping Schema
|
|
73
|
+
* BigQuery has no event-level mapping configuration
|
|
74
|
+
*/
|
|
75
|
+
declare const MappingSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
76
|
+
/**
|
|
77
|
+
* Type inference from MappingSchema
|
|
78
|
+
*/
|
|
79
|
+
type Mapping = z.infer<typeof MappingSchema>;
|
|
80
|
+
|
|
81
|
+
declare const settings: zod_to_json_schema.JsonSchema7Type & {
|
|
82
|
+
$schema?: string | undefined;
|
|
83
|
+
definitions?: {
|
|
84
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
85
|
+
} | undefined;
|
|
86
|
+
};
|
|
87
|
+
declare const mapping: zod_to_json_schema.JsonSchema7Type & {
|
|
88
|
+
$schema?: string | undefined;
|
|
89
|
+
definitions?: {
|
|
90
|
+
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
91
|
+
} | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
36
94
|
type index_Mapping = Mapping;
|
|
37
|
-
|
|
38
|
-
type index_PushEvents = PushEvents;
|
|
39
|
-
type index_PushFn = PushFn;
|
|
40
|
-
type index_Rule = Rule;
|
|
41
|
-
type index_Rules = Rules;
|
|
95
|
+
declare const index_MappingSchema: typeof MappingSchema;
|
|
42
96
|
type index_Settings = Settings;
|
|
43
|
-
|
|
97
|
+
declare const index_SettingsSchema: typeof SettingsSchema;
|
|
98
|
+
declare const index_mapping: typeof mapping;
|
|
99
|
+
declare const index_settings: typeof settings;
|
|
44
100
|
declare namespace index {
|
|
45
|
-
export
|
|
101
|
+
export { type index_Mapping as Mapping, index_MappingSchema as MappingSchema, type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_mapping as mapping, index_settings as settings };
|
|
46
102
|
}
|
|
47
103
|
|
|
48
104
|
declare const destinationBigQuery: Destination;
|
|
49
105
|
|
|
50
|
-
export { index as DestinationBigQuery, destinationBigQuery };
|
|
106
|
+
export { index$1 as DestinationBigQuery, destinationBigQuery, index as schemas };
|