@walkeros/server-destination-gcp 0.2.1 → 0.3.1

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 CHANGED
@@ -1,8 +1,9 @@
1
1
  import { DestinationServer } from '@walkeros/server-core';
2
- import { Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
2
+ import * as _walkeros_core from '@walkeros/core';
3
+ import { Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
3
4
  import { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';
4
5
 
5
- interface Settings {
6
+ interface Settings$1 {
6
7
  client: BigQuery;
7
8
  projectId: string;
8
9
  datasetId: string;
@@ -10,41 +11,72 @@ 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$1.Rule<Mapping>;
30
- type Rules = Mapping$1.Rules<Rule>;
31
-
32
- type index_Config = Config;
33
- type index_Destination = Destination;
34
- type index_Env = Env;
35
- type index_InitFn = InitFn;
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
+ }, z.core.$strip>;
55
+ type Settings = z.infer<typeof SettingsSchema>;
56
+
57
+ /**
58
+ * GCP BigQuery Mapping Schema
59
+ * BigQuery has no event-level mapping configuration
60
+ */
61
+ declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
62
+ /**
63
+ * Type inference from MappingSchema
64
+ */
65
+ type Mapping = z.infer<typeof MappingSchema>;
66
+
67
+ declare const settings: _walkeros_core.JSONSchema;
68
+ declare const mapping: _walkeros_core.JSONSchema;
69
+
36
70
  type index_Mapping = Mapping;
37
- type index_PartialConfig = PartialConfig;
38
- type index_PushEvents = PushEvents;
39
- type index_PushFn = PushFn;
40
- type index_Rule = Rule;
41
- type index_Rules = Rules;
71
+ declare const index_MappingSchema: typeof MappingSchema;
42
72
  type index_Settings = Settings;
43
- type index_Types = Types;
73
+ declare const index_SettingsSchema: typeof SettingsSchema;
74
+ declare const index_mapping: typeof mapping;
75
+ declare const index_settings: typeof settings;
44
76
  declare namespace index {
45
- export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_InitFn as InitFn, index_Mapping as Mapping, index_PartialConfig as PartialConfig, index_PushEvents as PushEvents, index_PushFn as PushFn, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Types as Types };
77
+ 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
78
  }
47
79
 
48
80
  declare const destinationBigQuery: Destination;
49
81
 
50
- export { index as DestinationBigQuery, destinationBigQuery };
82
+ 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$1 } from '@walkeros/core';
2
+ import * as _walkeros_core from '@walkeros/core';
3
+ import { Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
3
4
  import { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';
4
5
 
5
- interface Settings {
6
+ interface Settings$1 {
6
7
  client: BigQuery;
7
8
  projectId: string;
8
9
  datasetId: string;
@@ -10,41 +11,72 @@ 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$1.Rule<Mapping>;
30
- type Rules = Mapping$1.Rules<Rule>;
31
-
32
- type index_Config = Config;
33
- type index_Destination = Destination;
34
- type index_Env = Env;
35
- type index_InitFn = InitFn;
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
+ }, z.core.$strip>;
55
+ type Settings = z.infer<typeof SettingsSchema>;
56
+
57
+ /**
58
+ * GCP BigQuery Mapping Schema
59
+ * BigQuery has no event-level mapping configuration
60
+ */
61
+ declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
62
+ /**
63
+ * Type inference from MappingSchema
64
+ */
65
+ type Mapping = z.infer<typeof MappingSchema>;
66
+
67
+ declare const settings: _walkeros_core.JSONSchema;
68
+ declare const mapping: _walkeros_core.JSONSchema;
69
+
36
70
  type index_Mapping = Mapping;
37
- type index_PartialConfig = PartialConfig;
38
- type index_PushEvents = PushEvents;
39
- type index_PushFn = PushFn;
40
- type index_Rule = Rule;
41
- type index_Rules = Rules;
71
+ declare const index_MappingSchema: typeof MappingSchema;
42
72
  type index_Settings = Settings;
43
- type index_Types = Types;
73
+ declare const index_SettingsSchema: typeof SettingsSchema;
74
+ declare const index_mapping: typeof mapping;
75
+ declare const index_settings: typeof settings;
44
76
  declare namespace index {
45
- export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_InitFn as InitFn, index_Mapping as Mapping, index_PartialConfig as PartialConfig, index_PushEvents as PushEvents, index_PushFn as PushFn, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Types as Types };
77
+ 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
78
  }
47
79
 
48
80
  declare const destinationBigQuery: Destination;
49
81
 
50
- export { index as DestinationBigQuery, destinationBigQuery };
82
+ export { index$1 as DestinationBigQuery, destinationBigQuery, index as schemas };