@walkeros/web-destination-api 0.3.1 → 0.4.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/dev.d.mts +81 -0
- package/dist/dev.d.ts +81 -0
- package/dist/dev.js +1 -0
- package/dist/dev.js.map +1 -0
- package/dist/dev.mjs +1 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/examples/index.js +19 -12922
- package/dist/examples/index.mjs +19 -12922
- package/dist/index.browser.js +1 -1
- package/dist/index.d.mts +19 -85
- package/dist/index.d.ts +19 -85
- package/dist/index.es5.js +1 -1
- 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/package.json +7 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,106 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Destination as Destination$1, SendHeaders, Mapping as Mapping$2, SendDataValue, z } from '@walkeros/core';
|
|
1
|
+
import { Destination as Destination$1, SendHeaders, Mapping as Mapping$1, SendDataValue } from '@walkeros/core';
|
|
3
2
|
import { DestinationWeb, SendWebTransport, sendWeb } from '@walkeros/web-core';
|
|
4
3
|
|
|
5
|
-
interface Settings
|
|
4
|
+
interface Settings {
|
|
6
5
|
url: string;
|
|
7
6
|
headers?: SendHeaders;
|
|
8
7
|
method?: string;
|
|
9
8
|
transform?: Transform;
|
|
10
9
|
transport?: SendWebTransport;
|
|
11
10
|
}
|
|
12
|
-
|
|
11
|
+
type InitSettings = Partial<Settings>;
|
|
12
|
+
interface Mapping {
|
|
13
13
|
}
|
|
14
14
|
interface Env extends DestinationWeb.Env {
|
|
15
15
|
sendWeb?: typeof sendWeb;
|
|
16
16
|
}
|
|
17
|
-
type Types = Destination$1.Types<Settings
|
|
17
|
+
type Types = Destination$1.Types<Settings, Mapping, Env, InitSettings>;
|
|
18
18
|
type Destination = DestinationWeb.Destination<Types>;
|
|
19
19
|
type Config = DestinationWeb.Config<Types>;
|
|
20
|
-
type Rule = Mapping$
|
|
21
|
-
type Rules = Mapping$
|
|
22
|
-
type Transform = (data?: unknown, config?: Config, mapping?: Mapping$
|
|
23
|
-
|
|
24
|
-
type
|
|
25
|
-
type
|
|
26
|
-
type
|
|
27
|
-
type
|
|
28
|
-
type index$2_Rules = Rules;
|
|
29
|
-
type index$2_Transform = Transform;
|
|
30
|
-
type index$2_Types = Types;
|
|
31
|
-
declare namespace index$2 {
|
|
32
|
-
export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, Mapping$1 as Mapping, index$2_Rule as Rule, index$2_Rules as Rules, Settings$1 as Settings, index$2_Transform as Transform, index$2_Types as Types };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
declare const init: Env | undefined;
|
|
36
|
-
declare const push: Env;
|
|
37
|
-
/**
|
|
38
|
-
* Simulation tracking paths
|
|
39
|
-
* Specifies which function calls to track during simulation
|
|
40
|
-
*/
|
|
41
|
-
declare const simulation: string[];
|
|
42
|
-
|
|
43
|
-
declare const env_init: typeof init;
|
|
44
|
-
declare const env_push: typeof push;
|
|
45
|
-
declare const env_simulation: typeof simulation;
|
|
46
|
-
declare namespace env {
|
|
47
|
-
export { env_init as init, env_push as push, env_simulation as simulation };
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare function entity_action$1(): string;
|
|
51
|
-
|
|
52
|
-
declare namespace events {
|
|
53
|
-
export { entity_action$1 as entity_action };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
declare const entity_action: Rule;
|
|
57
|
-
declare const config: {
|
|
58
|
-
entity: {
|
|
59
|
-
action: Rule;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
declare const mapping$1_config: typeof config;
|
|
64
|
-
declare const mapping$1_entity_action: typeof entity_action;
|
|
65
|
-
declare namespace mapping$1 {
|
|
66
|
-
export { mapping$1_config as config, mapping$1_entity_action as entity_action };
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
declare const index$1_env: typeof env;
|
|
70
|
-
declare const index$1_events: typeof events;
|
|
71
|
-
declare namespace index$1 {
|
|
72
|
-
export { index$1_env as env, index$1_events as events, mapping$1 as mapping };
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
declare const SettingsSchema: z.ZodObject<{
|
|
76
|
-
url: z.ZodString;
|
|
77
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
78
|
-
method: z.ZodDefault<z.ZodString>;
|
|
79
|
-
transform: z.ZodOptional<z.ZodAny>;
|
|
80
|
-
transport: z.ZodDefault<z.ZodEnum<{
|
|
81
|
-
fetch: "fetch";
|
|
82
|
-
beacon: "beacon";
|
|
83
|
-
xhr: "xhr";
|
|
84
|
-
}>>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
type Settings = z.infer<typeof SettingsSchema>;
|
|
87
|
-
|
|
88
|
-
declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
|
|
89
|
-
type Mapping = z.infer<typeof MappingSchema>;
|
|
90
|
-
|
|
91
|
-
declare const settings: _walkeros_core.JSONSchema;
|
|
92
|
-
declare const mapping: _walkeros_core.JSONSchema;
|
|
93
|
-
|
|
20
|
+
type Rule = Mapping$1.Rule<Mapping>;
|
|
21
|
+
type Rules = Mapping$1.Rules<Rule>;
|
|
22
|
+
type Transform = (data?: unknown, config?: Config, mapping?: Mapping$1.Rule<Mapping>) => SendDataValue;
|
|
23
|
+
|
|
24
|
+
type index_Config = Config;
|
|
25
|
+
type index_Destination = Destination;
|
|
26
|
+
type index_Env = Env;
|
|
27
|
+
type index_InitSettings = InitSettings;
|
|
94
28
|
type index_Mapping = Mapping;
|
|
95
|
-
|
|
29
|
+
type index_Rule = Rule;
|
|
30
|
+
type index_Rules = Rules;
|
|
96
31
|
type index_Settings = Settings;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
declare const index_settings: typeof settings;
|
|
32
|
+
type index_Transform = Transform;
|
|
33
|
+
type index_Types = Types;
|
|
100
34
|
declare namespace index {
|
|
101
|
-
export {
|
|
35
|
+
export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_InitSettings as InitSettings, index_Mapping as Mapping, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Transform as Transform, index_Types as Types };
|
|
102
36
|
}
|
|
103
37
|
|
|
104
38
|
declare const destinationAPI: Destination;
|
|
105
39
|
|
|
106
|
-
export { index
|
|
40
|
+
export { index as DestinationAPI, destinationAPI as default, destinationAPI };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,106 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Destination as Destination$1, SendHeaders, Mapping as Mapping$2, SendDataValue, z } from '@walkeros/core';
|
|
1
|
+
import { Destination as Destination$1, SendHeaders, Mapping as Mapping$1, SendDataValue } from '@walkeros/core';
|
|
3
2
|
import { DestinationWeb, SendWebTransport, sendWeb } from '@walkeros/web-core';
|
|
4
3
|
|
|
5
|
-
interface Settings
|
|
4
|
+
interface Settings {
|
|
6
5
|
url: string;
|
|
7
6
|
headers?: SendHeaders;
|
|
8
7
|
method?: string;
|
|
9
8
|
transform?: Transform;
|
|
10
9
|
transport?: SendWebTransport;
|
|
11
10
|
}
|
|
12
|
-
|
|
11
|
+
type InitSettings = Partial<Settings>;
|
|
12
|
+
interface Mapping {
|
|
13
13
|
}
|
|
14
14
|
interface Env extends DestinationWeb.Env {
|
|
15
15
|
sendWeb?: typeof sendWeb;
|
|
16
16
|
}
|
|
17
|
-
type Types = Destination$1.Types<Settings
|
|
17
|
+
type Types = Destination$1.Types<Settings, Mapping, Env, InitSettings>;
|
|
18
18
|
type Destination = DestinationWeb.Destination<Types>;
|
|
19
19
|
type Config = DestinationWeb.Config<Types>;
|
|
20
|
-
type Rule = Mapping$
|
|
21
|
-
type Rules = Mapping$
|
|
22
|
-
type Transform = (data?: unknown, config?: Config, mapping?: Mapping$
|
|
23
|
-
|
|
24
|
-
type
|
|
25
|
-
type
|
|
26
|
-
type
|
|
27
|
-
type
|
|
28
|
-
type index$2_Rules = Rules;
|
|
29
|
-
type index$2_Transform = Transform;
|
|
30
|
-
type index$2_Types = Types;
|
|
31
|
-
declare namespace index$2 {
|
|
32
|
-
export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, Mapping$1 as Mapping, index$2_Rule as Rule, index$2_Rules as Rules, Settings$1 as Settings, index$2_Transform as Transform, index$2_Types as Types };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
declare const init: Env | undefined;
|
|
36
|
-
declare const push: Env;
|
|
37
|
-
/**
|
|
38
|
-
* Simulation tracking paths
|
|
39
|
-
* Specifies which function calls to track during simulation
|
|
40
|
-
*/
|
|
41
|
-
declare const simulation: string[];
|
|
42
|
-
|
|
43
|
-
declare const env_init: typeof init;
|
|
44
|
-
declare const env_push: typeof push;
|
|
45
|
-
declare const env_simulation: typeof simulation;
|
|
46
|
-
declare namespace env {
|
|
47
|
-
export { env_init as init, env_push as push, env_simulation as simulation };
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare function entity_action$1(): string;
|
|
51
|
-
|
|
52
|
-
declare namespace events {
|
|
53
|
-
export { entity_action$1 as entity_action };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
declare const entity_action: Rule;
|
|
57
|
-
declare const config: {
|
|
58
|
-
entity: {
|
|
59
|
-
action: Rule;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
declare const mapping$1_config: typeof config;
|
|
64
|
-
declare const mapping$1_entity_action: typeof entity_action;
|
|
65
|
-
declare namespace mapping$1 {
|
|
66
|
-
export { mapping$1_config as config, mapping$1_entity_action as entity_action };
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
declare const index$1_env: typeof env;
|
|
70
|
-
declare const index$1_events: typeof events;
|
|
71
|
-
declare namespace index$1 {
|
|
72
|
-
export { index$1_env as env, index$1_events as events, mapping$1 as mapping };
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
declare const SettingsSchema: z.ZodObject<{
|
|
76
|
-
url: z.ZodString;
|
|
77
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
78
|
-
method: z.ZodDefault<z.ZodString>;
|
|
79
|
-
transform: z.ZodOptional<z.ZodAny>;
|
|
80
|
-
transport: z.ZodDefault<z.ZodEnum<{
|
|
81
|
-
fetch: "fetch";
|
|
82
|
-
beacon: "beacon";
|
|
83
|
-
xhr: "xhr";
|
|
84
|
-
}>>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
type Settings = z.infer<typeof SettingsSchema>;
|
|
87
|
-
|
|
88
|
-
declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
|
|
89
|
-
type Mapping = z.infer<typeof MappingSchema>;
|
|
90
|
-
|
|
91
|
-
declare const settings: _walkeros_core.JSONSchema;
|
|
92
|
-
declare const mapping: _walkeros_core.JSONSchema;
|
|
93
|
-
|
|
20
|
+
type Rule = Mapping$1.Rule<Mapping>;
|
|
21
|
+
type Rules = Mapping$1.Rules<Rule>;
|
|
22
|
+
type Transform = (data?: unknown, config?: Config, mapping?: Mapping$1.Rule<Mapping>) => SendDataValue;
|
|
23
|
+
|
|
24
|
+
type index_Config = Config;
|
|
25
|
+
type index_Destination = Destination;
|
|
26
|
+
type index_Env = Env;
|
|
27
|
+
type index_InitSettings = InitSettings;
|
|
94
28
|
type index_Mapping = Mapping;
|
|
95
|
-
|
|
29
|
+
type index_Rule = Rule;
|
|
30
|
+
type index_Rules = Rules;
|
|
96
31
|
type index_Settings = Settings;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
declare const index_settings: typeof settings;
|
|
32
|
+
type index_Transform = Transform;
|
|
33
|
+
type index_Types = Types;
|
|
100
34
|
declare namespace index {
|
|
101
|
-
export {
|
|
35
|
+
export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_InitSettings as InitSettings, index_Mapping as Mapping, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Transform as Transform, index_Types as Types };
|
|
102
36
|
}
|
|
103
37
|
|
|
104
38
|
declare const destinationAPI: Destination;
|
|
105
39
|
|
|
106
|
-
export { index
|
|
40
|
+
export { index as DestinationAPI, destinationAPI as default, destinationAPI };
|