@teardown/ingest-api 0.1.46 → 0.1.48

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.
@@ -83,43 +83,44 @@ export declare const baseApp: Elysia<"", {
83
83
  identify: {
84
84
  post: {
85
85
  body: {
86
- user?: {
87
- name?: string | undefined;
88
- email?: string | undefined;
89
- user_id?: string | undefined;
90
- } | undefined;
91
86
  device: {
92
87
  timestamp?: Date | undefined;
93
88
  os: {
89
+ platform: import("@teardown/types").DevicePlatformEnum;
94
90
  name: string;
95
91
  version: string;
96
- platform: import("@teardown/types").DevicePlatformEnum;
97
92
  };
98
93
  application: {
99
- build_number: number;
100
94
  version: string;
95
+ build_number: number;
101
96
  };
102
97
  hardware: {
103
- device_brand: string;
104
98
  device_name: string;
105
99
  device_type: string;
100
+ device_brand: string;
106
101
  };
107
102
  update: {
108
- created_at: string;
109
- is_embedded_launch: boolean;
110
- update_id: string;
111
103
  is_enabled: boolean;
104
+ update_id: string;
112
105
  update_channel: string;
113
106
  runtime_version: string;
114
107
  emergency_launch: {
115
108
  is_emergency_launch: true;
116
109
  reason: string;
117
110
  } | {
118
- reason?: undefined;
119
111
  is_emergency_launch: false;
112
+ reason?: undefined;
120
113
  };
114
+ is_embedded_launch: boolean;
115
+ created_at: string;
121
116
  } | null;
122
117
  };
118
+ user?: {
119
+ persona_id?: string | undefined;
120
+ user_id?: string | undefined;
121
+ email?: string | undefined;
122
+ name?: string | undefined;
123
+ } | undefined;
123
124
  };
124
125
  params: {};
125
126
  query: unknown;
@@ -135,9 +136,9 @@ export declare const baseApp: Elysia<"", {
135
136
  200: {
136
137
  success: true;
137
138
  data: {
139
+ session_id: string;
138
140
  device_id: string;
139
141
  user_id: string;
140
- session_id: string;
141
142
  token: string;
142
143
  version_info: {
143
144
  status: import("@teardown/schemas").IdentifyVersionStatusEnum;
@@ -145,16 +146,16 @@ export declare const baseApp: Elysia<"", {
145
146
  status: import("@teardown/schemas").IdentifyVersionStatusEnum.UPDATE_AVAILABLE;
146
147
  update: {
147
148
  version: string;
148
- update_id: string;
149
149
  build: string;
150
+ update_id: string;
150
151
  effective_date: Date;
151
152
  };
152
153
  } | {
153
154
  status: import("@teardown/schemas").IdentifyVersionStatusEnum.UPDATE_RECOMMENDED;
154
155
  update: {
155
156
  version: string;
156
- update_id: string;
157
157
  build: string;
158
+ update_id: string;
158
159
  effective_date: Date;
159
160
  };
160
161
  } | null;
@@ -164,39 +165,39 @@ export declare const baseApp: Elysia<"", {
164
165
  400: {
165
166
  success: false;
166
167
  error: {
167
- message: string;
168
168
  code: "MISSING_ORG_ID";
169
- } | {
170
169
  message: string;
171
- code: "MISSING_PROJECT_ID";
172
170
  } | {
171
+ code: "MISSING_PROJECT_ID";
173
172
  message: string;
174
- code: "MISSING_ENVIRONMENT_SLUG";
175
173
  } | {
174
+ code: "MISSING_ENVIRONMENT_SLUG";
176
175
  message: string;
177
- code: "MISSING_DEVICE_ID";
178
176
  } | {
177
+ code: "MISSING_DEVICE_ID";
179
178
  message: string;
180
- code: "IDENTIFY_FAILED";
181
179
  } | {
180
+ code: "IDENTIFY_FAILED";
182
181
  message: string;
183
- code: "NO_SESSION_ID_GENERATED";
184
182
  } | {
183
+ code: "NO_SESSION_ID_GENERATED";
185
184
  message: string;
186
- code: "NO_DEVICE_ID_GENERATED";
187
185
  } | {
186
+ code: "NO_DEVICE_ID_GENERATED";
188
187
  message: string;
188
+ } | {
189
189
  code: "NO_USER_ID_GENERATED";
190
+ message: string;
190
191
  };
191
192
  };
192
193
  422: {
193
194
  type: "validation";
194
195
  on: string;
195
- summary?: string;
196
- message?: string;
196
+ summary?: string | undefined;
197
+ message?: string | undefined;
197
198
  found?: unknown;
198
- property?: string;
199
- expected?: string;
199
+ property?: string | undefined;
200
+ expected?: string | undefined;
200
201
  };
201
202
  };
202
203
  };
@@ -209,16 +210,16 @@ export declare const baseApp: Elysia<"", {
209
210
  events: {
210
211
  post: {
211
212
  body: {
212
- device_id?: string | undefined;
213
- session_id?: string | undefined;
214
213
  events: {
214
+ event_name: string;
215
+ event_type: "action" | "custom" | "screen_view";
215
216
  properties?: {} | undefined;
216
- device_id?: string | undefined;
217
- session_id?: string | undefined;
218
217
  timestamp?: string | undefined;
219
- event_name: string;
220
- event_type: "action" | "screen_view" | "custom";
218
+ session_id?: string | undefined;
219
+ device_id?: string | undefined;
221
220
  }[];
221
+ session_id?: string | undefined;
222
+ device_id?: string | undefined;
222
223
  };
223
224
  params: {};
224
225
  query: unknown;
@@ -242,42 +243,42 @@ export declare const baseApp: Elysia<"", {
242
243
  400: {
243
244
  success: false;
244
245
  error: {
245
- message: string;
246
246
  code: "MISSING_ORG_ID";
247
- } | {
248
247
  message: string;
249
- code: "MISSING_PROJECT_ID";
250
248
  } | {
249
+ code: "MISSING_PROJECT_ID";
251
250
  message: string;
252
- code: "MISSING_ENVIRONMENT_SLUG";
253
251
  } | {
252
+ code: "MISSING_ENVIRONMENT_SLUG";
254
253
  message: string;
255
- code: "MISSING_DEVICE_ID";
256
254
  } | {
255
+ code: "MISSING_DEVICE_ID";
257
256
  message: string;
258
- code: "EVENTS_PROCESSING_FAILED";
259
257
  } | {
258
+ code: "EVENTS_PROCESSING_FAILED";
260
259
  message: string;
261
- code: "INVALID_SESSION";
262
260
  } | {
261
+ code: "INVALID_SESSION";
263
262
  message: string;
264
- code: "INVALID_DEVICE";
265
263
  } | {
264
+ code: "INVALID_DEVICE";
266
265
  message: string;
267
- code: "BATCH_SIZE_EXCEEDED";
268
266
  } | {
267
+ code: "BATCH_SIZE_EXCEEDED";
269
268
  message: string;
269
+ } | {
270
270
  code: "VALIDATION_ERROR";
271
+ message: string;
271
272
  };
272
273
  };
273
274
  422: {
274
275
  type: "validation";
275
276
  on: string;
276
- summary?: string;
277
- message?: string;
277
+ summary?: string | undefined;
278
+ message?: string | undefined;
278
279
  found?: unknown;
279
- property?: string;
280
- expected?: string;
280
+ property?: string | undefined;
281
+ expected?: string | undefined;
281
282
  };
282
283
  };
283
284
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teardown/ingest-api",
3
- "version": "0.1.46",
3
+ "version": "0.1.48",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "scripts": {
31
31
  "dev": "bun run typecheck --watch",
32
- "typecheck": "tsc --noEmit --project ./tsconfig.lib.json",
32
+ "typecheck": "bun x tsgo --noEmit --project ./tsconfig.lib.json",
33
33
  "generate:types": "bun run scripts/generate-types.ts",
34
34
  "build": "bun run generate:types",
35
35
  "prepublishOnly": "bun run generate:types",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@elysiajs/eden": "1.4.5",
42
- "@teardown/errors": "0.1.46",
43
- "@teardown/schemas": "0.1.46",
44
- "@teardown/types": "0.1.46",
42
+ "@teardown/errors": "0.1.48",
43
+ "@teardown/schemas": "0.1.48",
44
+ "@teardown/types": "0.1.48",
45
45
  "zod": "4.1.13"
46
46
  },
47
47
  "peerDependencies": {
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@biomejs/biome": "2.3.8",
52
52
  "@types/bun": "1.3.4",
53
- "@teardown/tsconfig": "0.1.46",
54
- "elysia": "1.4.17"
53
+ "@teardown/tsconfig": "0.1.48",
54
+ "elysia": "1.4.19"
55
55
  }
56
56
  }
@@ -12,5 +12,4 @@ export type RequestOptions = Omit<NonNullable<Parameters<Client>[1]>, "headers">
12
12
  };
13
13
 
14
14
  export type Endpoints = Parameters<Client>[0];
15
-
16
15
  export type App = typeof IngestApp;
@@ -1,2 +1 @@
1
1
  export * from "./client";
2
- export * from "./types";
package/tsconfig.lib.json CHANGED
@@ -6,7 +6,6 @@
6
6
  ],
7
7
  "compilerOptions": {
8
8
  "noEmit": true,
9
- "baseUrl": ".",
10
9
  "rootDir": ".",
11
10
  "paths": {
12
11
  "@/*": ["./src/*"]
@@ -1,84 +0,0 @@
1
- export declare class EdenFetchError<Status extends number = number, Value = unknown> extends Error {
2
- status: Status;
3
- value: Value;
4
- constructor(status: Status, value: Value);
5
- }
6
-
7
- export type Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
8
- export type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N
9
- ? Acc[number]
10
- : Enumerate<N, [...Acc, Acc["length"]]>;
11
- export type ErrorRange = Range<300, 599>;
12
- export type MapError<T extends Record<number, unknown>> = [
13
- {
14
- [K in keyof T]-?: K extends ErrorRange ? K : never;
15
- }[keyof T],
16
- ] extends [infer A extends number]
17
- ? {
18
- [K in A]: EdenFetchError<K, T[K]>;
19
- }[A]
20
- : false;
21
- export type UnionToIntersect<U> = (U extends any ? (arg: U) => any : never) extends (arg: infer I) => void ? I : never;
22
- export type IsAny<T> = 0 extends 1 & T ? true : false;
23
- export type IsNever<T> = [T] extends [never] ? true : false;
24
- export type IsUnknown<T> = IsAny<T> extends true ? false : unknown extends T ? true : false;
25
- export type IsExactlyUnknown<T> = [T] extends [unknown] ? ([unknown] extends [T] ? true : false) : false;
26
- export type IsUndefined<T> = [T] extends [undefined] ? true : false;
27
- export type IsMatchingEmptyObject<T> = [T] extends [{}] ? ([{}] extends [T] ? true : false) : false;
28
- export type MaybeEmptyObject<
29
- TObj,
30
- TKey extends PropertyKey,
31
- TFallback = Record<string, unknown>,
32
- > = IsUndefined<TObj> extends true
33
- ? {
34
- [K in TKey]?: TFallback;
35
- }
36
- : IsExactlyUnknown<TObj> extends true
37
- ? {
38
- [K in TKey]?: TFallback;
39
- }
40
- : IsMatchingEmptyObject<TObj> extends true
41
- ? {
42
- [K in TKey]?: TObj;
43
- }
44
- : undefined extends TObj
45
- ? {
46
- [K in TKey]?: TObj;
47
- }
48
- : null extends TObj
49
- ? {
50
- [K in TKey]?: TObj;
51
- }
52
- : {
53
- [K in TKey]: TObj;
54
- };
55
- type AnyTypedRoute = {
56
- body?: unknown;
57
- headers?: unknown;
58
- query?: unknown;
59
- params?: unknown;
60
- response: Record<number, unknown>;
61
- };
62
- export type Prettify<T> = {
63
- [K in keyof T]: T[K];
64
- } & {};
65
- export type TreatyToPath<T, Path extends string = ""> = UnionToIntersect<
66
- T extends Record<string, unknown>
67
- ? {
68
- [K in keyof T]: T[K] extends AnyTypedRoute
69
- ? {
70
- [path in Path]: {
71
- [method in K]: T[K];
72
- };
73
- }
74
- : unknown extends T[K]
75
- ? {
76
- [path in Path]: {
77
- [method in K]: T[K];
78
- };
79
- }
80
- : TreatyToPath<T[K], `${Path}/${K & string}`>;
81
- }[keyof T]
82
- : {}
83
- >;
84
- export type Not<T> = T extends true ? false : true;