@axium/calendar 0.4.4 → 0.4.6

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.
@@ -1,4 +1,4 @@
1
- import type { AttendeeInit, Calendar, Event, EventData, EventFilter } from './common.js';
1
+ import type { AttendeeInit, Calendar, Event, EventData, EventFilter } from '../common.js';
2
2
  export declare function getEvents(calendars: Calendar[], filter: EventFilter): Promise<Event[]>;
3
3
  export interface EventInitFormData extends Record<Exclude<keyof EventData, 'attendees' | 'recurrenceExcludes'>, string> {
4
4
  }
@@ -1,5 +1,5 @@
1
- import en from '../locales/en.json';
2
- import './common.js';
1
+ import en from '../../locales/en.json';
2
+ import '../common.js';
3
3
  type en = typeof en;
4
4
  declare module '@axium/client/locales' {
5
5
  interface Locale extends en {
@@ -0,0 +1,4 @@
1
+ import { extendLocale } from '@axium/client';
2
+ import en from '../../locales/en.json' with { type: 'json' };
3
+ import '../common.js';
4
+ extendLocale('en', en);
package/dist/common.d.ts CHANGED
@@ -59,7 +59,7 @@ export declare const EventData: z.ZodObject<{
59
59
  end: z.ZodCoercedDate<unknown>;
60
60
  isAllDay: z.ZodCoercedBoolean<unknown>;
61
61
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
62
+ color: any;
63
63
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
64
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
65
65
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -74,7 +74,7 @@ export declare const EventInit: z.ZodObject<{
74
74
  end: z.ZodCoercedDate<unknown>;
75
75
  isAllDay: z.ZodCoercedBoolean<unknown>;
76
76
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
77
+ color: any;
78
78
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
79
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
80
80
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -96,7 +96,7 @@ export declare const Event: z.ZodObject<{
96
96
  end: z.ZodCoercedDate<unknown>;
97
97
  isAllDay: z.ZodCoercedBoolean<unknown>;
98
98
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
99
+ color: any;
100
100
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
101
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
102
102
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -117,13 +117,13 @@ export interface Event extends z.infer<typeof Event> {
117
117
  export declare function formatEventTimes(event: Event): string;
118
118
  export declare const CalendarInit: z.ZodObject<{
119
119
  name: z.ZodString;
120
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
120
+ color: any;
121
121
  }, z.core.$strip>;
122
122
  export interface CalendarInit extends z.infer<typeof CalendarInit> {
123
123
  }
124
124
  export declare const Calendar: z.ZodObject<{
125
125
  name: z.ZodString;
126
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
126
+ color: any;
127
127
  id: z.ZodUUID;
128
128
  userId: z.ZodUUID;
129
129
  created: z.ZodCoercedDate<unknown>;
@@ -161,10 +161,10 @@ declare const CalendarAPI: {
161
161
  readonly 'users/:id/calendars': {
162
162
  readonly PUT: readonly [z.ZodObject<{
163
163
  name: z.ZodString;
164
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
164
+ color: any;
165
165
  }, z.core.$strip>, z.ZodObject<{
166
166
  name: z.ZodString;
167
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
167
+ color: any;
168
168
  id: z.ZodUUID;
169
169
  userId: z.ZodUUID;
170
170
  created: z.ZodCoercedDate<unknown>;
@@ -192,7 +192,7 @@ declare const CalendarAPI: {
192
192
  }, z.core.$strip>];
193
193
  readonly GET: z.ZodArray<z.ZodObject<{
194
194
  name: z.ZodString;
195
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
195
+ color: any;
196
196
  id: z.ZodUUID;
197
197
  userId: z.ZodUUID;
198
198
  created: z.ZodCoercedDate<unknown>;
@@ -222,7 +222,7 @@ declare const CalendarAPI: {
222
222
  readonly 'calendars/:id': {
223
223
  readonly GET: z.ZodObject<{
224
224
  name: z.ZodString;
225
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
225
+ color: any;
226
226
  id: z.ZodUUID;
227
227
  userId: z.ZodUUID;
228
228
  created: z.ZodCoercedDate<unknown>;
@@ -250,10 +250,10 @@ declare const CalendarAPI: {
250
250
  }, z.core.$strip>;
251
251
  readonly PATCH: readonly [z.ZodObject<{
252
252
  name: z.ZodString;
253
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
253
+ color: any;
254
254
  }, z.core.$strip>, z.ZodObject<{
255
255
  name: z.ZodString;
256
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
256
+ color: any;
257
257
  id: z.ZodUUID;
258
258
  userId: z.ZodUUID;
259
259
  created: z.ZodCoercedDate<unknown>;
@@ -281,7 +281,7 @@ declare const CalendarAPI: {
281
281
  }, z.core.$strip>];
282
282
  readonly DELETE: z.ZodObject<{
283
283
  name: z.ZodString;
284
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
284
+ color: any;
285
285
  id: z.ZodUUID;
286
286
  userId: z.ZodUUID;
287
287
  created: z.ZodCoercedDate<unknown>;
@@ -320,7 +320,7 @@ declare const CalendarAPI: {
320
320
  end: z.ZodCoercedDate<unknown>;
321
321
  isAllDay: z.ZodCoercedBoolean<unknown>;
322
322
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
323
+ color: any;
324
324
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
325
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
326
326
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -343,7 +343,7 @@ declare const CalendarAPI: {
343
343
  end: z.ZodCoercedDate<unknown>;
344
344
  isAllDay: z.ZodCoercedBoolean<unknown>;
345
345
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
346
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
346
+ color: any;
347
347
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
348
348
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
349
349
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -362,7 +362,7 @@ declare const CalendarAPI: {
362
362
  end: z.ZodCoercedDate<unknown>;
363
363
  isAllDay: z.ZodCoercedBoolean<unknown>;
364
364
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
365
+ color: any;
366
366
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
367
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
368
368
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -387,7 +387,7 @@ declare const CalendarAPI: {
387
387
  end: z.ZodCoercedDate<unknown>;
388
388
  isAllDay: z.ZodCoercedBoolean<unknown>;
389
389
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
390
+ color: any;
391
391
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
392
392
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
393
393
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -410,7 +410,7 @@ declare const CalendarAPI: {
410
410
  end: z.ZodCoercedDate<unknown>;
411
411
  isAllDay: z.ZodCoercedBoolean<unknown>;
412
412
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
413
+ color: any;
414
414
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
415
415
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
416
416
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -429,7 +429,7 @@ declare const CalendarAPI: {
429
429
  end: z.ZodCoercedDate<unknown>;
430
430
  isAllDay: z.ZodCoercedBoolean<unknown>;
431
431
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
432
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
432
+ color: any;
433
433
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
434
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
435
435
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -452,7 +452,7 @@ declare const CalendarAPI: {
452
452
  end: z.ZodCoercedDate<unknown>;
453
453
  isAllDay: z.ZodCoercedBoolean<unknown>;
454
454
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
455
- color: z.ZodOptional<z.ZodNullable<z.ZodCustomStringFormat<"hex">>>;
455
+ color: any;
456
456
  recurrence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
457
457
  recurrenceExcludes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
458
458
  recurrenceId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -1,3 +1,3 @@
1
- import './common.js';
2
- import './server.js';
1
+ import '../common.js';
2
+ import './index.js';
3
3
  export declare function statusText(): Promise<string>;
@@ -1,6 +1,6 @@
1
1
  import { count } from '@axium/server/database';
2
- import './common.js';
3
- import './server.js';
2
+ import '../common.js';
3
+ import './index.js';
4
4
  export async function statusText() {
5
5
  const { calendars, events } = await count('calendars', 'events');
6
6
  return `${calendars} calendars containing ${events} events`;
@@ -1,5 +1,5 @@
1
- import type schema from '../db.json';
2
1
  import type { FromFile as FromSchemaFile } from '@axium/server/db/schema';
2
+ import type schema from '../../db.json';
3
3
  declare module '@axium/server/database' {
4
4
  interface Schema extends FromSchemaFile<typeof schema> {
5
5
  }
@@ -6,7 +6,7 @@ import { addRoute } from '@axium/server/routes';
6
6
  import { sql } from 'kysely';
7
7
  import { jsonArrayFrom, jsonObjectFrom } from 'kysely/helpers/postgres';
8
8
  import * as z from 'zod';
9
- import { Attendee, CalendarInit, EventFilter, EventInit } from './common.js';
9
+ import { Attendee, CalendarInit, EventFilter, EventInit } from '../common.js';
10
10
  function withEncoded(value) {
11
11
  return (value.color === undefined || value.color === null
12
12
  ? value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/calendar",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "Calendar for Axium",
6
6
  "funding": {
@@ -21,6 +21,8 @@
21
21
  "types": "dist/index.d.ts",
22
22
  "exports": {
23
23
  ".": "./dist/index.js",
24
+ "./server": "./dist/server/index.js",
25
+ "./client": "./dist/client/index.js",
24
26
  "./*": "./dist/*.js",
25
27
  "./components": "./lib/index.js",
26
28
  "./components/*": "./lib/*.svelte"
@@ -40,6 +42,7 @@
40
42
  "@axium/core": ">=0.23.0",
41
43
  "@axium/server": ">=0.36.0",
42
44
  "@sveltejs/kit": "^2.27.3",
45
+ "kysely": "^0.28.15",
43
46
  "utilium": "^3.0.0"
44
47
  },
45
48
  "dependencies": {
@@ -50,9 +53,9 @@
50
53
  "axium": {
51
54
  "server": {
52
55
  "routes": "routes",
53
- "hooks": "./dist/hooks.js",
56
+ "hooks": "./dist/server/hooks.js",
54
57
  "db": "./db.json",
55
- "web_client_hooks": "./dist/web_hook.js"
58
+ "web_client_hooks": "./dist/client/web_hook.js"
56
59
  },
57
60
  "apps": [
58
61
  {
package/dist/web_hook.js DELETED
@@ -1,4 +0,0 @@
1
- import { extendLocale } from '@axium/client';
2
- import en from '../locales/en.json' with { type: 'json' };
3
- import './common.js';
4
- extendLocale('en', en);
File without changes