@interfere/types 0.0.2 → 0.0.3
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/config.d.ts +32 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -0
- package/dist/envelope.d.ts +45 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/envelope.js +27 -0
- package/dist/envelope.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/project.d.ts +4 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +3 -0
- package/dist/project.js.map +1 -0
- package/dist/session.d.ts +4 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +3 -0
- package/dist/session.js.map +1 -0
- package/package.json +1 -1
- package/dist/index.d.mts +0 -3
- package/dist/index.mjs +0 -7
- package/dist/utils.d.ts +0 -2
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -2
- package/dist/utils.js.map +0 -1
- package/dist/utils.test.d.ts +0 -2
- package/dist/utils.test.d.ts.map +0 -1
- package/dist/utils.test.js +0 -6
- package/dist/utils.test.js.map +0 -1
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const runtimeSchema: z.ZodEnum<{
|
|
3
|
+
client: "client";
|
|
4
|
+
server: "server";
|
|
5
|
+
edge: "edge";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const envSchema: z.ZodEnum<{
|
|
8
|
+
development: "development";
|
|
9
|
+
preview: "preview";
|
|
10
|
+
production: "production";
|
|
11
|
+
}>;
|
|
12
|
+
export type Runtime = z.infer<typeof runtimeSchema>;
|
|
13
|
+
export type Env = z.infer<typeof envSchema>;
|
|
14
|
+
export declare const configSchema: z.ZodObject<{
|
|
15
|
+
projectId: z.ZodString;
|
|
16
|
+
runtime: z.ZodEnum<{
|
|
17
|
+
client: "client";
|
|
18
|
+
server: "server";
|
|
19
|
+
edge: "edge";
|
|
20
|
+
}>;
|
|
21
|
+
env: z.ZodEnum<{
|
|
22
|
+
development: "development";
|
|
23
|
+
preview: "preview";
|
|
24
|
+
production: "production";
|
|
25
|
+
}>;
|
|
26
|
+
endpoint: z.ZodURL;
|
|
27
|
+
flushInterval: z.ZodInt;
|
|
28
|
+
debug: z.ZodBoolean;
|
|
29
|
+
sessionId: z.ZodUUID;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type Config = z.infer<typeof configSchema>;
|
|
32
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,aAAa;;;;EAAuC,CAAC;AAClE,eAAO,MAAM,SAAS;;;;EAAmD,CAAC;AAE1E,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE5C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;iBAQvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { projectIdSchema } from './project.js';
|
|
3
|
+
import { sessionIdSchema } from './session.js';
|
|
4
|
+
export const runtimeSchema = z.enum(['client', 'server', 'edge']);
|
|
5
|
+
export const envSchema = z.enum(['development', 'preview', 'production']);
|
|
6
|
+
export const configSchema = z.object({
|
|
7
|
+
projectId: projectIdSchema,
|
|
8
|
+
runtime: runtimeSchema,
|
|
9
|
+
env: envSchema,
|
|
10
|
+
endpoint: z.url(),
|
|
11
|
+
flushInterval: z.int().positive(),
|
|
12
|
+
debug: z.boolean(),
|
|
13
|
+
sessionId: sessionIdSchema,
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAClE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;AAK1E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,aAAa;IACtB,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE;IACjB,aAAa,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;IAClB,SAAS,EAAE,eAAe;CAC3B,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const envelopeVersion: z.ZodUnion<readonly [z.ZodLiteral<"0">]>;
|
|
3
|
+
export type EnvelopeVersion = z.infer<typeof envelopeVersion>;
|
|
4
|
+
export declare const eventTypeSchema: z.ZodEnum<{
|
|
5
|
+
error: "error";
|
|
6
|
+
custom: "custom";
|
|
7
|
+
ui_event: "ui_event";
|
|
8
|
+
network: "network";
|
|
9
|
+
server_req: "server_req";
|
|
10
|
+
server_error: "server_error";
|
|
11
|
+
edge_req: "edge_req";
|
|
12
|
+
edge_error: "edge_error";
|
|
13
|
+
}>;
|
|
14
|
+
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
15
|
+
export declare const envelopeSchema: z.ZodObject<{
|
|
16
|
+
v: z.ZodUnion<readonly [z.ZodLiteral<"0">]>;
|
|
17
|
+
runtime: z.ZodEnum<{
|
|
18
|
+
client: "client";
|
|
19
|
+
server: "server";
|
|
20
|
+
edge: "edge";
|
|
21
|
+
}>;
|
|
22
|
+
project: z.ZodString;
|
|
23
|
+
env: z.ZodEnum<{
|
|
24
|
+
development: "development";
|
|
25
|
+
preview: "preview";
|
|
26
|
+
production: "production";
|
|
27
|
+
}>;
|
|
28
|
+
client_ts: z.ZodInt;
|
|
29
|
+
session_id: z.ZodUUID;
|
|
30
|
+
seq: z.ZodInt;
|
|
31
|
+
type: z.ZodEnum<{
|
|
32
|
+
error: "error";
|
|
33
|
+
custom: "custom";
|
|
34
|
+
ui_event: "ui_event";
|
|
35
|
+
network: "network";
|
|
36
|
+
server_req: "server_req";
|
|
37
|
+
server_error: "server_error";
|
|
38
|
+
edge_req: "edge_req";
|
|
39
|
+
edge_error: "edge_error";
|
|
40
|
+
}>;
|
|
41
|
+
payload: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type Envelope = z.infer<typeof envelopeSchema>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,eAAe,0CAA4B,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,eAAe;;;;;;;;;EAS1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/envelope.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { envSchema, runtimeSchema } from './config.js';
|
|
3
|
+
import { projectIdSchema } from './project.js';
|
|
4
|
+
import { sessionIdSchema } from './session.js';
|
|
5
|
+
const envelopeVersion = z.union([z.literal('0')]);
|
|
6
|
+
export const eventTypeSchema = z.enum([
|
|
7
|
+
'ui_event',
|
|
8
|
+
'error',
|
|
9
|
+
'network',
|
|
10
|
+
'custom',
|
|
11
|
+
'server_req',
|
|
12
|
+
'server_error',
|
|
13
|
+
'edge_req',
|
|
14
|
+
'edge_error',
|
|
15
|
+
]);
|
|
16
|
+
export const envelopeSchema = z.object({
|
|
17
|
+
v: envelopeVersion,
|
|
18
|
+
runtime: runtimeSchema,
|
|
19
|
+
project: projectIdSchema,
|
|
20
|
+
env: envSchema,
|
|
21
|
+
client_ts: z.int().positive(),
|
|
22
|
+
session_id: sessionIdSchema,
|
|
23
|
+
seq: z.int().positive(),
|
|
24
|
+
type: eventTypeSchema,
|
|
25
|
+
payload: z.instanceof(Uint8Array),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAIlD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,UAAU;IACV,OAAO;IACP,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,cAAc;IACd,UAAU;IACV,YAAY;CACb,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,CAAC,EAAE,eAAe;IAClB,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,eAAe;IACxB,GAAG,EAAE,SAAS;IACd,SAAS,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC7B,UAAU,EAAE,eAAe;IAC3B,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;CAClC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,aAAiC,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/project.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/session.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
package/dist/index.d.mts
DELETED
package/dist/index.mjs
DELETED
package/dist/utils.d.ts
DELETED
package/dist/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,WAAU,CAAC"}
|
package/dist/utils.js
DELETED
package/dist/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC"}
|
package/dist/utils.test.d.ts
DELETED
package/dist/utils.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../src/utils.test.ts"],"names":[],"mappings":""}
|
package/dist/utils.test.js
DELETED
package/dist/utils.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.test.js","sourceRoot":"","sources":["../src/utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;IACf,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|