@interfere/types 0.1.0-alpha.2 → 0.1.0-alpha.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/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://interfere.com">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://qyzkf4cgb8ydxtq1.public.blob.vercel-storage.com/v2/header/logo-dark.png">
|
|
5
|
+
<img src="https://qyzkf4cgb8ydxtq1.public.blob.vercel-storage.com/v2/header/logo-light.png" height="64">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
<h1 align="center">@interfere/types</h1>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@interfere/types"><img src="https://img.shields.io/npm/v/@interfere/types.svg" /></a>
|
|
13
|
+
<a href="https://github.com/interfere-inc/interfere/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@interfere/types.svg" /></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
Shared TypeScript types and Zod schemas for <a href="https://interfere.com">Interfere</a> SDKs.
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @interfere/types
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Notice
|
|
29
|
+
|
|
30
|
+
This is still a work in progress, and we are pushing breaking changes almost daily. Until `v1.0.0`, there are no guarantees of stable backwards compatibility.
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|
package/dist/events/index.d.mts
CHANGED
|
@@ -135,9 +135,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
135
135
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
136
136
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
137
137
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
138
|
+
edge: "edge";
|
|
138
139
|
client: "client";
|
|
139
140
|
server: "server";
|
|
140
|
-
edge: "edge";
|
|
141
141
|
}>>;
|
|
142
142
|
buildId: z.ZodNullable<z.ZodString>;
|
|
143
143
|
timestamp: z.ZodDate;
|
|
@@ -221,9 +221,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
221
221
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
222
222
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
223
223
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
224
|
+
edge: "edge";
|
|
224
225
|
client: "client";
|
|
225
226
|
server: "server";
|
|
226
|
-
edge: "edge";
|
|
227
227
|
}>>;
|
|
228
228
|
buildId: z.ZodNullable<z.ZodString>;
|
|
229
229
|
timestamp: z.ZodDate;
|
|
@@ -245,9 +245,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
245
245
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
246
246
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
247
247
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
248
|
+
edge: "edge";
|
|
248
249
|
client: "client";
|
|
249
250
|
server: "server";
|
|
250
|
-
edge: "edge";
|
|
251
251
|
}>>;
|
|
252
252
|
buildId: z.ZodNullable<z.ZodString>;
|
|
253
253
|
timestamp: z.ZodDate;
|
|
@@ -268,9 +268,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
268
268
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
269
269
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
270
270
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
271
|
+
edge: "edge";
|
|
271
272
|
client: "client";
|
|
272
273
|
server: "server";
|
|
273
|
-
edge: "edge";
|
|
274
274
|
}>>;
|
|
275
275
|
buildId: z.ZodNullable<z.ZodString>;
|
|
276
276
|
timestamp: z.ZodDate;
|
|
@@ -290,9 +290,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
290
290
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
291
291
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
292
292
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
293
|
+
edge: "edge";
|
|
293
294
|
client: "client";
|
|
294
295
|
server: "server";
|
|
295
|
-
edge: "edge";
|
|
296
296
|
}>>;
|
|
297
297
|
buildId: z.ZodNullable<z.ZodString>;
|
|
298
298
|
timestamp: z.ZodDate;
|
|
@@ -316,9 +316,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
316
316
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
317
317
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
318
318
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
319
|
+
edge: "edge";
|
|
319
320
|
client: "client";
|
|
320
321
|
server: "server";
|
|
321
|
-
edge: "edge";
|
|
322
322
|
}>>;
|
|
323
323
|
buildId: z.ZodNullable<z.ZodString>;
|
|
324
324
|
timestamp: z.ZodDate;
|
|
@@ -342,9 +342,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
342
342
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
343
343
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
344
344
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
345
|
+
edge: "edge";
|
|
345
346
|
client: "client";
|
|
346
347
|
server: "server";
|
|
347
|
-
edge: "edge";
|
|
348
348
|
}>>;
|
|
349
349
|
buildId: z.ZodNullable<z.ZodString>;
|
|
350
350
|
timestamp: z.ZodDate;
|
|
@@ -370,9 +370,9 @@ declare const factsEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
370
370
|
sessionId: z.ZodNullable<z.ZodString>;
|
|
371
371
|
fingerprint: z.ZodNullable<z.ZodString>;
|
|
372
372
|
errorSource: z.ZodNullable<z.ZodEnum<{
|
|
373
|
+
edge: "edge";
|
|
373
374
|
client: "client";
|
|
374
375
|
server: "server";
|
|
375
|
-
edge: "edge";
|
|
376
376
|
}>>;
|
|
377
377
|
buildId: z.ZodNullable<z.ZodString>;
|
|
378
378
|
timestamp: z.ZodDate;
|
|
@@ -26,22 +26,22 @@ declare const destinationProviderSchema: z.ZodEnum<{
|
|
|
26
26
|
}>;
|
|
27
27
|
type DestinationProvider = z.infer<typeof destinationProviderSchema>;
|
|
28
28
|
declare const releaseSourceIdEnvKeySchema: z.ZodEnum<{
|
|
29
|
+
VERCEL_GIT_COMMIT_SHA: "VERCEL_GIT_COMMIT_SHA";
|
|
30
|
+
GITHUB_SHA: "GITHUB_SHA";
|
|
29
31
|
NEXT_PUBLIC_INTERFERE_BUILD_ID: "NEXT_PUBLIC_INTERFERE_BUILD_ID";
|
|
30
32
|
INTERFERE_SOURCE_ID: "INTERFERE_SOURCE_ID";
|
|
31
33
|
NEXT_BUILD_ID: "NEXT_BUILD_ID";
|
|
32
|
-
VERCEL_GIT_COMMIT_SHA: "VERCEL_GIT_COMMIT_SHA";
|
|
33
|
-
GITHUB_SHA: "GITHUB_SHA";
|
|
34
34
|
}>;
|
|
35
35
|
type ReleaseSourceIdEnvKey = z.infer<typeof releaseSourceIdEnvKeySchema>;
|
|
36
|
-
declare const releaseSourceIdEnvKeys: ("
|
|
36
|
+
declare const releaseSourceIdEnvKeys: ("VERCEL_GIT_COMMIT_SHA" | "GITHUB_SHA" | "NEXT_PUBLIC_INTERFERE_BUILD_ID" | "INTERFERE_SOURCE_ID" | "NEXT_BUILD_ID")[];
|
|
37
37
|
declare const releaseDestinationIdEnvKeySchema: z.ZodEnum<{
|
|
38
38
|
VERCEL_GIT_COMMIT_SHA: "VERCEL_GIT_COMMIT_SHA";
|
|
39
39
|
GITHUB_SHA: "GITHUB_SHA";
|
|
40
|
+
VERCEL_DEPLOYMENT_ID: "VERCEL_DEPLOYMENT_ID";
|
|
40
41
|
NEXT_PUBLIC_INTERFERE_RELEASE_ID: "NEXT_PUBLIC_INTERFERE_RELEASE_ID";
|
|
41
42
|
INTERFERE_DESTINATION_ID: "INTERFERE_DESTINATION_ID";
|
|
42
|
-
VERCEL_DEPLOYMENT_ID: "VERCEL_DEPLOYMENT_ID";
|
|
43
43
|
}>;
|
|
44
44
|
type ReleaseDestinationIdEnvKey = z.infer<typeof releaseDestinationIdEnvKeySchema>;
|
|
45
|
-
declare const releaseDestinationIdEnvKeys: ("VERCEL_GIT_COMMIT_SHA" | "GITHUB_SHA" | "
|
|
45
|
+
declare const releaseDestinationIdEnvKeys: ("VERCEL_GIT_COMMIT_SHA" | "GITHUB_SHA" | "VERCEL_DEPLOYMENT_ID" | "NEXT_PUBLIC_INTERFERE_RELEASE_ID" | "INTERFERE_DESTINATION_ID")[];
|
|
46
46
|
//#endregion
|
|
47
47
|
export { DestinationProvider, ReleaseDestinationIdEnvKey, ReleaseDestinationMetadata, ReleaseSourceIdEnvKey, ReleaseSourceMetadata, SourceProvider, destinationProviderSchema, releaseDestinationIdEnvKeySchema, releaseDestinationIdEnvKeys, releaseDestinationMetadataSchema, releaseSourceIdEnvKeySchema, releaseSourceIdEnvKeys, releaseSourceMetadataSchema, sourceProviderSchema };
|
package/dist/sdk/config.d.mts
CHANGED
|
@@ -35,8 +35,8 @@ declare const configSchema: z.ZodPipe<z.ZodIntersection<z.ZodObject<{
|
|
|
35
35
|
production: "production";
|
|
36
36
|
}>>;
|
|
37
37
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
38
|
-
edge: "edge";
|
|
39
38
|
browser: "browser";
|
|
39
|
+
edge: "edge";
|
|
40
40
|
node: "node";
|
|
41
41
|
}>>;
|
|
42
42
|
}, z.core.$strip>;
|
|
@@ -65,7 +65,7 @@ declare const configSchema: z.ZodPipe<z.ZodIntersection<z.ZodObject<{
|
|
|
65
65
|
buildId: string | null;
|
|
66
66
|
releaseId: string | null;
|
|
67
67
|
environment: "development" | "preview" | "production" | null;
|
|
68
|
-
runtime: "
|
|
68
|
+
runtime: "browser" | "edge" | "node" | null;
|
|
69
69
|
};
|
|
70
70
|
batch: {
|
|
71
71
|
size: number;
|
|
@@ -89,7 +89,7 @@ declare const configSchema: z.ZodPipe<z.ZodIntersection<z.ZodObject<{
|
|
|
89
89
|
buildId: string | null;
|
|
90
90
|
releaseId: string | null;
|
|
91
91
|
environment: "development" | "preview" | "production" | null;
|
|
92
|
-
runtime: "
|
|
92
|
+
runtime: "browser" | "edge" | "node" | null;
|
|
93
93
|
};
|
|
94
94
|
batch: {
|
|
95
95
|
size: number;
|
|
@@ -114,7 +114,7 @@ declare const configSchema: z.ZodPipe<z.ZodIntersection<z.ZodObject<{
|
|
|
114
114
|
buildId: string | null;
|
|
115
115
|
releaseId: string | null;
|
|
116
116
|
environment: "development" | "preview" | "production" | null;
|
|
117
|
-
runtime: "
|
|
117
|
+
runtime: "browser" | "edge" | "node" | null;
|
|
118
118
|
};
|
|
119
119
|
batch: {
|
|
120
120
|
size: number;
|
|
@@ -148,8 +148,8 @@ declare const configInputSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
148
148
|
production: "production";
|
|
149
149
|
}>>>;
|
|
150
150
|
runtime: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
151
|
-
edge: "edge";
|
|
152
151
|
browser: "browser";
|
|
152
|
+
edge: "edge";
|
|
153
153
|
node: "node";
|
|
154
154
|
}>>>;
|
|
155
155
|
}, z.core.$strip>>;
|
package/dist/sdk/envelope.d.mts
CHANGED
|
@@ -12,10 +12,10 @@ type EnvelopeVersion = z.infer<typeof envelopeVersion>;
|
|
|
12
12
|
* - "client": Session ID was set on the client (browser SDK)
|
|
13
13
|
*/
|
|
14
14
|
declare const sessionSourceSchema: z.ZodOptional<z.ZodEnum<{
|
|
15
|
-
client: "client";
|
|
16
15
|
header: "header";
|
|
17
16
|
async_context: "async_context";
|
|
18
17
|
fallback: "fallback";
|
|
18
|
+
client: "client";
|
|
19
19
|
}>>;
|
|
20
20
|
type SessionSource = z.infer<typeof sessionSourceSchema>;
|
|
21
21
|
declare const envelopeContextSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -171,16 +171,16 @@ declare const envelopeSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
171
171
|
}>>;
|
|
172
172
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
173
173
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
174
|
-
edge: "edge";
|
|
175
174
|
browser: "browser";
|
|
175
|
+
edge: "edge";
|
|
176
176
|
node: "node";
|
|
177
177
|
}>>;
|
|
178
178
|
sessionId: z.ZodNullable<z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>>;
|
|
179
179
|
sessionSource: z.ZodOptional<z.ZodEnum<{
|
|
180
|
-
client: "client";
|
|
181
180
|
header: "header";
|
|
182
181
|
async_context: "async_context";
|
|
183
182
|
fallback: "fallback";
|
|
183
|
+
client: "client";
|
|
184
184
|
}>>;
|
|
185
185
|
uuid: z.ZodUUID;
|
|
186
186
|
v: z.ZodUnion<readonly [z.ZodLiteral<0>]>;
|
|
@@ -329,16 +329,16 @@ declare const stampedEnvelopeSchema: z.ZodIntersection<z.ZodIntersection<z.ZodOb
|
|
|
329
329
|
}>>;
|
|
330
330
|
releaseId: z.ZodNullable<z.ZodString>;
|
|
331
331
|
runtime: z.ZodNullable<z.ZodEnum<{
|
|
332
|
-
edge: "edge";
|
|
333
332
|
browser: "browser";
|
|
333
|
+
edge: "edge";
|
|
334
334
|
node: "node";
|
|
335
335
|
}>>;
|
|
336
336
|
sessionId: z.ZodNullable<z.ZodUnion<readonly [z.ZodUUID, z.ZodTemplateLiteral<`server_${string}`>]>>;
|
|
337
337
|
sessionSource: z.ZodOptional<z.ZodEnum<{
|
|
338
|
-
client: "client";
|
|
339
338
|
header: "header";
|
|
340
339
|
async_context: "async_context";
|
|
341
340
|
fallback: "fallback";
|
|
341
|
+
client: "client";
|
|
342
342
|
}>>;
|
|
343
343
|
uuid: z.ZodUUID;
|
|
344
344
|
v: z.ZodUnion<readonly [z.ZodLiteral<0>]>;
|
|
@@ -2,9 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
//#region src/sdk/plugins/payload/errors.d.ts
|
|
4
4
|
declare const errorSourceSchema: z.ZodEnum<{
|
|
5
|
+
edge: "edge";
|
|
5
6
|
client: "client";
|
|
6
7
|
server: "server";
|
|
7
|
-
edge: "edge";
|
|
8
8
|
}>;
|
|
9
9
|
type ErrorSource = z.infer<typeof errorSourceSchema>;
|
|
10
10
|
declare const errorMechanismSchema: z.ZodObject<{
|
package/dist/sdk/runtime.d.mts
CHANGED
|
@@ -8,8 +8,8 @@ declare const envSchema: z.ZodNullable<z.ZodEnum<{
|
|
|
8
8
|
}>>;
|
|
9
9
|
type Env = z.infer<typeof envSchema>;
|
|
10
10
|
declare const runtimeSchema: z.ZodNullable<z.ZodEnum<{
|
|
11
|
-
edge: "edge";
|
|
12
11
|
browser: "browser";
|
|
12
|
+
edge: "edge";
|
|
13
13
|
node: "node";
|
|
14
14
|
}>>;
|
|
15
15
|
type Runtime = z.infer<typeof runtimeSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interfere/types",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "TypeScript & Zod types for Interfere",
|
|
6
6
|
"keywords": [
|
|
@@ -106,17 +106,17 @@
|
|
|
106
106
|
"typecheck": "tsc --noEmit --incremental"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@interfere/constants": "
|
|
110
|
-
"error-stack-parser-es": "
|
|
111
|
-
"zod": "
|
|
109
|
+
"@interfere/constants": "0.1.0-alpha.2",
|
|
110
|
+
"error-stack-parser-es": "^1.0.5",
|
|
111
|
+
"zod": "^4.3.6"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@interfere/typescript-config": "
|
|
115
|
-
"@interfere/vitest-config": "
|
|
116
|
-
"@types/node": "
|
|
117
|
-
"@vitest/coverage-v8": "
|
|
118
|
-
"tsdown": "
|
|
119
|
-
"typescript": "
|
|
120
|
-
"vitest": "
|
|
114
|
+
"@interfere/typescript-config": "1.1.0-alpha.3",
|
|
115
|
+
"@interfere/vitest-config": "1.1.0-alpha.3",
|
|
116
|
+
"@types/node": "^24.10.13",
|
|
117
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
118
|
+
"tsdown": "0.21.2",
|
|
119
|
+
"typescript": "5.9.3",
|
|
120
|
+
"vitest": "^4.0.18"
|
|
121
121
|
}
|
|
122
122
|
}
|