@lcas58/esmi-api-types 1.0.8 → 1.0.10

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.
Files changed (52) hide show
  1. package/dist/src/routes/events/events.handlers.d.ts +2 -18
  2. package/dist/src/routes/events/events.handlers.js +24 -154
  3. package/dist/src/routes/events/events.index.d.ts +47 -442
  4. package/dist/src/routes/events/events.index.js +1 -3
  5. package/dist/src/routes/events/events.routes.d.ts +347 -1194
  6. package/dist/src/routes/events/events.routes.js +11 -53
  7. package/dist/src/routes/events/schemas/event.schemas.d.ts +173 -824
  8. package/dist/src/routes/events/schemas/event.schemas.js +26 -46
  9. package/dist/src/routes/events/schemas/index.d.ts +1 -1
  10. package/dist/src/routes/events/schemas/index.js +1 -1
  11. package/dist/src/routes/leagues/leagues.handlers.js +2 -1
  12. package/dist/src/routes/marketing/marketing.index.d.ts +15 -15
  13. package/dist/src/routes/marketing/marketing.routes.d.ts +5 -5
  14. package/dist/src/routes/organizations/organizations.index.d.ts +6 -6
  15. package/dist/src/routes/sports/sports.handlers.d.ts +4 -0
  16. package/dist/src/routes/sports/sports.handlers.js +23 -0
  17. package/dist/src/routes/sports/sports.index.d.ts +45 -0
  18. package/dist/src/routes/sports/sports.index.js +7 -0
  19. package/dist/src/routes/sports/sports.routes.d.ts +90 -0
  20. package/dist/src/routes/sports/sports.routes.js +27 -0
  21. package/dist/src/routes/webhooks/webhooks.handlers.d.ts +3 -0
  22. package/dist/src/routes/webhooks/webhooks.handlers.js +14 -0
  23. package/dist/src/routes/webhooks/webhooks.index.d.ts +32 -0
  24. package/dist/src/routes/webhooks/webhooks.index.js +6 -0
  25. package/dist/src/routes/webhooks/webhooks.routes.d.ts +65 -0
  26. package/dist/src/routes/webhooks/webhooks.routes.js +26 -0
  27. package/dist/src/shared/client-types.d.ts +3 -16
  28. package/dist/src/shared/client-types.js +0 -12
  29. package/package.json +25 -32
  30. package/dist/src/app.d.ts +0 -2
  31. package/dist/src/app.js +0 -22
  32. package/dist/src/db/schema/event.d.ts +0 -264
  33. package/dist/src/db/schema/event.js +0 -38
  34. package/dist/src/db/schema/index.d.ts +0 -8
  35. package/dist/src/db/schema/index.js +0 -8
  36. package/dist/src/db/schema/league.d.ts +0 -261
  37. package/dist/src/db/schema/league.js +0 -27
  38. package/dist/src/db/schema/location.d.ts +0 -239
  39. package/dist/src/db/schema/location.js +0 -22
  40. package/dist/src/db/schema/marketing.d.ts +0 -77
  41. package/dist/src/db/schema/marketing.js +0 -16
  42. package/dist/src/db/schema/organization.d.ts +0 -882
  43. package/dist/src/db/schema/organization.js +0 -174
  44. package/dist/src/db/schema/pickup.d.ts +0 -417
  45. package/dist/src/db/schema/pickup.js +0 -42
  46. package/dist/src/db/schema/tag.d.ts +0 -261
  47. package/dist/src/db/schema/tag.js +0 -55
  48. package/dist/src/db/schema/user.d.ts +0 -597
  49. package/dist/src/db/schema/user.js +0 -45
  50. package/dist/src/lib/types.d.ts +0 -14
  51. package/dist/src/shared/index.d.ts +0 -7
  52. package/dist/src/shared/index.js +0 -28
package/package.json CHANGED
@@ -1,38 +1,30 @@
1
1
  {
2
2
  "name": "@lcas58/esmi-api-types",
3
3
  "type": "module",
4
- "version": "1.0.8",
4
+ "version": "1.0.10",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {
8
- "types": "./dist/src/shared/index.d.ts",
9
- "default": "./dist/src/shared/index.js"
10
- },
11
- "./client-types": {
12
8
  "types": "./dist/src/shared/client-types.d.ts",
13
9
  "default": "./dist/src/shared/client-types.js"
14
10
  }
15
11
  },
16
- "main": "./dist/src/shared/index.js",
17
- "types": "./dist/src/shared/index.d.ts",
12
+ "main": "./dist/src/shared/client-types.js",
13
+ "types": "./dist/src/shared/client-types.d.ts",
18
14
  "files": [
19
- "dist/src/app.d.ts",
20
- "dist/src/app.js",
21
- "dist/src/db/schema",
22
- "dist/src/lib/types.d.ts",
23
15
  "dist/src/routes",
24
- "dist/src/shared"
16
+ "dist/src/shared/client-types.d.ts",
17
+ "dist/src/shared/client-types.js"
25
18
  ],
26
19
  "scripts": {
27
20
  "dev": "wrangler dev",
28
21
  "deploy": "wrangler deploy --minify",
29
- "start": "node ./dist/src/index.js",
22
+ "start": "node ./dist/src/app.js",
30
23
  "typecheck": "tsc --noEmit",
31
24
  "lint": "eslint .",
32
25
  "lint:fix": "npm run lint --fix",
33
26
  "test": "cross-env NODE_ENV=test vitest",
34
27
  "build": "tsc && tsc-alias",
35
- "prepublishOnly": "bun run build",
36
28
  "db:studio": "bunx drizzle-kit studio",
37
29
  "db:generate": "bunx drizzle-kit generate",
38
30
  "db:migrate": "bunx drizzle-kit migrate",
@@ -42,37 +34,38 @@
42
34
  "zod": "^3.23.8"
43
35
  },
44
36
  "dependencies": {
45
- "@auth/core": "^0.37.0",
46
- "@auth/drizzle-adapter": "^1.7.0",
37
+ "@auth/core": "^0.37.4",
38
+ "@auth/drizzle-adapter": "^1.11.0",
39
+ "@better-auth/expo": "^1.4.10",
47
40
  "@hono/zod-openapi": "^0.16.4",
48
- "@neondatabase/serverless": "^0.10.1",
49
- "@scalar/hono-api-reference": "^0.5.150",
50
- "better-auth": "^1.1.9",
51
- "dotenv": "^16.4.5",
52
- "dotenv-expand": "^11.0.6",
41
+ "@neondatabase/serverless": "^0.10.4",
42
+ "@scalar/hono-api-reference": "^0.5.184",
43
+ "better-auth": "^1.3.27",
44
+ "dotenv": "^16.6.1",
45
+ "dotenv-expand": "^11.0.7",
53
46
  "drizzle-orm": "^0.33.0",
54
47
  "drizzle-zod": "^0.5.1",
55
- "hono": "4.6.16",
48
+ "hono": "^4.11.3",
56
49
  "hono-pino": "^0.3.0",
57
- "next-auth": "^4.24.8",
58
- "pino": "^9.4.0",
59
- "pino-pretty": "^11.2.2",
60
- "stoker": "^1.0.9"
50
+ "next-auth": "^4.24.11",
51
+ "pino": "^9.13.1",
52
+ "pino-pretty": "^11.3.0",
53
+ "stoker": "^1.4.3"
61
54
  },
62
55
  "devDependencies": {
63
- "@antfu/eslint-config": "^3.7.3",
56
+ "@antfu/eslint-config": "^3.16.0",
64
57
  "@cloudflare/workers-types": "^4.20241018.0",
65
58
  "@hono/node-server": "^*",
66
- "@types/node": "^22.7.4",
59
+ "@types/node": "^22.19.3",
67
60
  "cross-env": "^7.0.3",
68
61
  "drizzle-kit": "^0.24.2",
69
- "eslint": "^9.12.0",
70
- "eslint-plugin-format": "^0.1.2",
62
+ "eslint": "^9.39.2",
63
+ "eslint-plugin-format": "^0.1.3",
71
64
  "tsc-alias": "^1.8.10",
72
65
  "tsx": "^4.19.1",
73
- "typescript": "^5.6.2",
66
+ "typescript": "^5.9.3",
74
67
  "vitest": "^2.1.2",
75
68
  "wrangler": "^4.34.0",
76
- "zod": "^3.23.8"
69
+ "zod": "^3.25.76"
77
70
  }
78
71
  }
package/dist/src/app.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const app: import("@hono/zod-openapi").OpenAPIHono<import("./shared/index.js").AppBindings, {}, "/">;
2
- export default app;
package/dist/src/app.js DELETED
@@ -1,22 +0,0 @@
1
- import configureOpenAPI from "./lib/configure-open-api.js";
2
- import createApp from "./lib/create-app.js";
3
- import events from "./routes/events/events.index.js";
4
- import index from "./routes/index.route.js";
5
- import leagues from "./routes/leagues/leagues.index.js";
6
- import marketing from "./routes/marketing/marketing.index.js";
7
- import organizations from "./routes/organizations/organizations.index.js";
8
- import tags from "./routes/tags/tags.index.js";
9
- const app = createApp();
10
- configureOpenAPI(app);
11
- const routes = [
12
- index,
13
- organizations,
14
- events,
15
- leagues,
16
- marketing,
17
- tags,
18
- ];
19
- routes.forEach((route) => {
20
- app.route("/", route);
21
- });
22
- export default app;
@@ -1,264 +0,0 @@
1
- declare const event: import("drizzle-orm/pg-core").PgTableWithColumns<{
2
- name: "event";
3
- schema: undefined;
4
- columns: {
5
- id: import("drizzle-orm/pg-core").PgColumn<{
6
- name: "id";
7
- tableName: "event";
8
- dataType: "string";
9
- columnType: "PgText";
10
- data: string;
11
- driverParam: string;
12
- notNull: true;
13
- hasDefault: true;
14
- isPrimaryKey: true;
15
- isAutoincrement: false;
16
- hasRuntimeDefault: true;
17
- enumValues: [string, ...string[]];
18
- baseColumn: never;
19
- generated: undefined;
20
- }, {}, {}>;
21
- name: import("drizzle-orm/pg-core").PgColumn<{
22
- name: "name";
23
- tableName: "event";
24
- dataType: "string";
25
- columnType: "PgVarchar";
26
- data: string;
27
- driverParam: string;
28
- notNull: true;
29
- hasDefault: false;
30
- isPrimaryKey: false;
31
- isAutoincrement: false;
32
- hasRuntimeDefault: false;
33
- enumValues: [string, ...string[]];
34
- baseColumn: never;
35
- generated: undefined;
36
- }, {}, {}>;
37
- description: import("drizzle-orm/pg-core").PgColumn<{
38
- name: "description";
39
- tableName: "event";
40
- dataType: "string";
41
- columnType: "PgText";
42
- data: string;
43
- driverParam: string;
44
- notNull: false;
45
- hasDefault: false;
46
- isPrimaryKey: false;
47
- isAutoincrement: false;
48
- hasRuntimeDefault: false;
49
- enumValues: [string, ...string[]];
50
- baseColumn: never;
51
- generated: undefined;
52
- }, {}, {}>;
53
- locationId: import("drizzle-orm/pg-core").PgColumn<{
54
- name: "location_id";
55
- tableName: "event";
56
- dataType: "string";
57
- columnType: "PgVarchar";
58
- data: string;
59
- driverParam: string;
60
- notNull: false;
61
- hasDefault: false;
62
- isPrimaryKey: false;
63
- isAutoincrement: false;
64
- hasRuntimeDefault: false;
65
- enumValues: [string, ...string[]];
66
- baseColumn: never;
67
- generated: undefined;
68
- }, {}, {}>;
69
- type: import("drizzle-orm/pg-core").PgColumn<{
70
- name: "type";
71
- tableName: "event";
72
- dataType: "string";
73
- columnType: "PgVarchar";
74
- data: string;
75
- driverParam: string;
76
- notNull: true;
77
- hasDefault: false;
78
- isPrimaryKey: false;
79
- isAutoincrement: false;
80
- hasRuntimeDefault: false;
81
- enumValues: [string, ...string[]];
82
- baseColumn: never;
83
- generated: undefined;
84
- }, {}, {}>;
85
- organizationId: import("drizzle-orm/pg-core").PgColumn<{
86
- name: "organizationId";
87
- tableName: "event";
88
- dataType: "string";
89
- columnType: "PgText";
90
- data: string;
91
- driverParam: string;
92
- notNull: true;
93
- hasDefault: false;
94
- isPrimaryKey: false;
95
- isAutoincrement: false;
96
- hasRuntimeDefault: false;
97
- enumValues: [string, ...string[]];
98
- baseColumn: never;
99
- generated: undefined;
100
- }, {}, {}>;
101
- creatorId: import("drizzle-orm/pg-core").PgColumn<{
102
- name: "creatorId";
103
- tableName: "event";
104
- dataType: "string";
105
- columnType: "PgText";
106
- data: string;
107
- driverParam: string;
108
- notNull: false;
109
- hasDefault: false;
110
- isPrimaryKey: false;
111
- isAutoincrement: false;
112
- hasRuntimeDefault: false;
113
- enumValues: [string, ...string[]];
114
- baseColumn: never;
115
- generated: undefined;
116
- }, {}, {}>;
117
- mode: import("drizzle-orm/pg-core").PgColumn<{
118
- name: "mode";
119
- tableName: "event";
120
- dataType: "string";
121
- columnType: "PgVarchar";
122
- data: string;
123
- driverParam: string;
124
- notNull: true;
125
- hasDefault: false;
126
- isPrimaryKey: false;
127
- isAutoincrement: false;
128
- hasRuntimeDefault: false;
129
- enumValues: [string, ...string[]];
130
- baseColumn: never;
131
- generated: undefined;
132
- }, {}, {}>;
133
- ageGroup: import("drizzle-orm/pg-core").PgColumn<{
134
- name: "age_group";
135
- tableName: "event";
136
- dataType: "string";
137
- columnType: "PgVarchar";
138
- data: string;
139
- driverParam: string;
140
- notNull: true;
141
- hasDefault: false;
142
- isPrimaryKey: false;
143
- isAutoincrement: false;
144
- hasRuntimeDefault: false;
145
- enumValues: [string, ...string[]];
146
- baseColumn: never;
147
- generated: undefined;
148
- }, {}, {}>;
149
- gender: import("drizzle-orm/pg-core").PgColumn<{
150
- name: "gender";
151
- tableName: "event";
152
- dataType: "string";
153
- columnType: "PgVarchar";
154
- data: string;
155
- driverParam: string;
156
- notNull: true;
157
- hasDefault: false;
158
- isPrimaryKey: false;
159
- isAutoincrement: false;
160
- hasRuntimeDefault: false;
161
- enumValues: [string, ...string[]];
162
- baseColumn: never;
163
- generated: undefined;
164
- }, {}, {}>;
165
- status: import("drizzle-orm/pg-core").PgColumn<{
166
- name: "status";
167
- tableName: "event";
168
- dataType: "string";
169
- columnType: "PgVarchar";
170
- data: string;
171
- driverParam: string;
172
- notNull: true;
173
- hasDefault: false;
174
- isPrimaryKey: false;
175
- isAutoincrement: false;
176
- hasRuntimeDefault: false;
177
- enumValues: [string, ...string[]];
178
- baseColumn: never;
179
- generated: undefined;
180
- }, {}, {}>;
181
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
182
- name: "created_at";
183
- tableName: "event";
184
- dataType: "date";
185
- columnType: "PgTimestamp";
186
- data: Date;
187
- driverParam: string;
188
- notNull: true;
189
- hasDefault: true;
190
- isPrimaryKey: false;
191
- isAutoincrement: false;
192
- hasRuntimeDefault: false;
193
- enumValues: undefined;
194
- baseColumn: never;
195
- generated: undefined;
196
- }, {}, {}>;
197
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
198
- name: "updated_at";
199
- tableName: "event";
200
- dataType: "date";
201
- columnType: "PgTimestamp";
202
- data: Date;
203
- driverParam: string;
204
- notNull: true;
205
- hasDefault: true;
206
- isPrimaryKey: false;
207
- isAutoincrement: false;
208
- hasRuntimeDefault: false;
209
- enumValues: undefined;
210
- baseColumn: never;
211
- generated: undefined;
212
- }, {}, {}>;
213
- };
214
- dialect: "pg";
215
- }>;
216
- export declare const eventRelations: import("drizzle-orm").Relations<"event", {
217
- creator: import("drizzle-orm").One<"user", false>;
218
- organization: import("drizzle-orm").One<"organization", true>;
219
- location: import("drizzle-orm").One<"location", false>;
220
- }>;
221
- export declare const selectEventSchema: import("zod").ZodObject<{
222
- id: import("zod").ZodString;
223
- name: import("zod").ZodString;
224
- description: import("zod").ZodNullable<import("zod").ZodString>;
225
- locationId: import("zod").ZodNullable<import("zod").ZodString>;
226
- type: import("zod").ZodString;
227
- organizationId: import("zod").ZodString;
228
- creatorId: import("zod").ZodNullable<import("zod").ZodString>;
229
- mode: import("zod").ZodString;
230
- ageGroup: import("zod").ZodString;
231
- gender: import("zod").ZodString;
232
- status: import("zod").ZodString;
233
- createdAt: import("zod").ZodDate;
234
- updatedAt: import("zod").ZodDate;
235
- }, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
236
- id: string;
237
- status: string;
238
- type: string;
239
- description: string | null;
240
- name: string;
241
- locationId: string | null;
242
- organizationId: string;
243
- mode: string;
244
- createdAt: Date;
245
- updatedAt: Date;
246
- creatorId: string | null;
247
- ageGroup: string;
248
- gender: string;
249
- }, {
250
- id: string;
251
- status: string;
252
- type: string;
253
- description: string | null;
254
- name: string;
255
- locationId: string | null;
256
- organizationId: string;
257
- mode: string;
258
- createdAt: Date;
259
- updatedAt: Date;
260
- creatorId: string | null;
261
- ageGroup: string;
262
- gender: string;
263
- }>;
264
- export default event;
@@ -1,38 +0,0 @@
1
- import { relations } from "drizzle-orm";
2
- import { pgTable, text, timestamp, varchar } from "drizzle-orm/pg-core";
3
- import { createSelectSchema } from "drizzle-zod";
4
- import { randomUUID } from "node:crypto";
5
- import location from "./location.js";
6
- import organization from "./organization.js";
7
- import { user } from "./user.js";
8
- const event = pgTable("event", {
9
- id: text("id").primaryKey().$defaultFn(() => randomUUID()),
10
- name: varchar("name", { length: 255 }).notNull(),
11
- description: text("description"),
12
- locationId: varchar("location_id").references(() => location.id),
13
- type: varchar("type").notNull(),
14
- organizationId: text("organizationId").references(() => organization.id, { onDelete: "cascade" }).notNull(),
15
- creatorId: text("creatorId").references(() => user.id, { onDelete: "set null" }),
16
- mode: varchar("mode").notNull(), // Adult, Youth
17
- ageGroup: varchar("age_group").notNull(),
18
- gender: varchar("gender").notNull(),
19
- status: varchar("status").notNull(), // IN_PROGRESS, COMPLETED, CANCELLED
20
- createdAt: timestamp("created_at").defaultNow().notNull(),
21
- updatedAt: timestamp("updated_at").defaultNow().notNull(),
22
- });
23
- export const eventRelations = relations(event, ({ one }) => ({
24
- creator: one(user, {
25
- fields: [event.creatorId],
26
- references: [user.id],
27
- }),
28
- organization: one(organization, {
29
- fields: [event.organizationId],
30
- references: [organization.id],
31
- }),
32
- location: one(location, {
33
- fields: [event.locationId],
34
- references: [location.id],
35
- }),
36
- }));
37
- export const selectEventSchema = createSelectSchema(event);
38
- export default event;
@@ -1,8 +0,0 @@
1
- export { default as event, eventRelations, selectEventSchema } from "./event.js";
2
- export { default as leagues, insertLeaguesSchema, leagueRelations, selectLeaguesSchema } from "./league.js";
3
- export { default as location, insertLocationSchema, locationRelations, selectLocationSchema } from "./location.js";
4
- export { emailCampaign, insertEmailCampaignSchema, selectEmailCampaignSchema } from "./marketing.js";
5
- export { createOrganizationWithDetailsSchema, default as organization, generateSocialMediaUrl, getOrganizationWithDetailsSchema, insertOrganizationSchema, insertOrganizationSocialMediaSchema, insertOrganizationTagSchema, insertOrganizationWebsiteSchema, organizationRelations, organizationSocialMedia, organizationSocialMediaRelations, organizationTagsRelations, organizationWebsites, organizationWebsitesRelations, patchOrganizationSchema, selectOrganizationSchema, SOCIAL_MEDIA_PLATFORMS, type SocialMediaPlatform } from "./organization.js";
6
- export { default as pickup, eventPickupRelations, pickupRelations, selectPickupSchema } from "./pickup.js";
7
- export { default as tags, eventTags, organizationTags, selectTagsSchema } from "./tag.js";
8
- export { account, selectUserSchema, session, user, verification } from "./user.js";
@@ -1,8 +0,0 @@
1
- export { default as event, eventRelations, selectEventSchema } from "./event.js";
2
- export { default as leagues, insertLeaguesSchema, leagueRelations, selectLeaguesSchema } from "./league.js";
3
- export { default as location, insertLocationSchema, locationRelations, selectLocationSchema } from "./location.js";
4
- export { emailCampaign, insertEmailCampaignSchema, selectEmailCampaignSchema } from "./marketing.js";
5
- export { createOrganizationWithDetailsSchema, default as organization, generateSocialMediaUrl, getOrganizationWithDetailsSchema, insertOrganizationSchema, insertOrganizationSocialMediaSchema, insertOrganizationTagSchema, insertOrganizationWebsiteSchema, organizationRelations, organizationSocialMedia, organizationSocialMediaRelations, organizationTagsRelations, organizationWebsites, organizationWebsitesRelations, patchOrganizationSchema, selectOrganizationSchema, SOCIAL_MEDIA_PLATFORMS } from "./organization.js";
6
- export { default as pickup, eventPickupRelations, pickupRelations, selectPickupSchema } from "./pickup.js";
7
- export { default as tags, eventTags, organizationTags, selectTagsSchema } from "./tag.js";
8
- export { account, selectUserSchema, session, user, verification } from "./user.js";