@robbeverhelst/do 1.107.0 → 1.109.0
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/do.js +69 -1
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -4719,6 +4719,7 @@ var connectionKind = pgEnum("connection_kind", ["sync", "ingest"]);
|
|
|
4719
4719
|
var connections = pgTable("connections", {
|
|
4720
4720
|
id: text("id").primaryKey(),
|
|
4721
4721
|
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4722
|
+
userId: text("user_id").references(() => users.id),
|
|
4722
4723
|
provider: text("provider").notNull(),
|
|
4723
4724
|
kind: connectionKind("kind").notNull().default("sync"),
|
|
4724
4725
|
status: connectionStatus("status").notNull().default("pending"),
|
|
@@ -4767,6 +4768,54 @@ var calendarEventLinks = pgTable("calendar_event_links", {
|
|
|
4767
4768
|
unique("calendar_event_links_connection_event_uniq").on(t.connectionId, t.externalEventId),
|
|
4768
4769
|
index("calendar_event_links_tenant_connection_idx").on(t.tenantId, t.connectionId)
|
|
4769
4770
|
]);
|
|
4771
|
+
var eventResponseStatus = pgEnum("event_response_status", [
|
|
4772
|
+
"none",
|
|
4773
|
+
"needs_action",
|
|
4774
|
+
"declined",
|
|
4775
|
+
"tentative",
|
|
4776
|
+
"accepted"
|
|
4777
|
+
]);
|
|
4778
|
+
var events = pgTable("events", {
|
|
4779
|
+
id: text("id").primaryKey().references(() => nodes.id),
|
|
4780
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4781
|
+
connectionId: text("connection_id").notNull().references(() => connections.id, { onDelete: "cascade" }),
|
|
4782
|
+
externalCalendarId: text("external_calendar_id").notNull(),
|
|
4783
|
+
externalEventId: text("external_event_id").notNull(),
|
|
4784
|
+
startAt: timestamp("start_at", { withTimezone: true }).notNull(),
|
|
4785
|
+
endAt: timestamp("end_at", { withTimezone: true }).notNull(),
|
|
4786
|
+
allDay: boolean("all_day").notNull().default(false),
|
|
4787
|
+
busy: boolean("busy").notNull().default(true),
|
|
4788
|
+
cancelled: boolean("cancelled").notNull().default(false),
|
|
4789
|
+
responseStatus: eventResponseStatus("response_status").notNull().default("none"),
|
|
4790
|
+
location: text("location"),
|
|
4791
|
+
meetingUrl: text("meeting_url"),
|
|
4792
|
+
organizer: text("organizer"),
|
|
4793
|
+
attendeeCount: integer("attendee_count"),
|
|
4794
|
+
etag: text("etag"),
|
|
4795
|
+
remoteUpdatedAt: timestamp("remote_updated_at", { withTimezone: true }),
|
|
4796
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
4797
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
4798
|
+
}, (t) => [
|
|
4799
|
+
unique("events_connection_event_uniq").on(t.connectionId, t.externalEventId),
|
|
4800
|
+
index("events_tenant_start_idx").on(t.tenantId, t.startAt),
|
|
4801
|
+
index("events_connection_start_idx").on(t.connectionId, t.startAt)
|
|
4802
|
+
]);
|
|
4803
|
+
var calendarConnectionCalendars = pgTable("calendar_connection_calendars", {
|
|
4804
|
+
id: text("id").primaryKey(),
|
|
4805
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4806
|
+
connectionId: text("connection_id").notNull().references(() => connections.id, { onDelete: "cascade" }),
|
|
4807
|
+
externalCalendarId: text("external_calendar_id").notNull(),
|
|
4808
|
+
summary: text("summary"),
|
|
4809
|
+
accessRole: text("access_role"),
|
|
4810
|
+
showInDo: boolean("show_in_do").notNull().default(true),
|
|
4811
|
+
countsAsBusy: boolean("counts_as_busy").notNull().default(true),
|
|
4812
|
+
isDoCalendar: boolean("is_do_calendar").notNull().default(false),
|
|
4813
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
4814
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
4815
|
+
}, (t) => [
|
|
4816
|
+
unique("calendar_connection_calendars_conn_cal_uniq").on(t.connectionId, t.externalCalendarId),
|
|
4817
|
+
index("calendar_connection_calendars_tenant_conn_idx").on(t.tenantId, t.connectionId)
|
|
4818
|
+
]);
|
|
4770
4819
|
// ../../packages/schema/src/db/media.ts
|
|
4771
4820
|
var bytea = customType({
|
|
4772
4821
|
dataType() {
|
|
@@ -21014,6 +21063,25 @@ var calendarSyncResultSchema = exports_external.object({
|
|
|
21014
21063
|
pushedDeleted: exports_external.number().int().nonnegative(),
|
|
21015
21064
|
conflicts: exports_external.number().int().nonnegative()
|
|
21016
21065
|
});
|
|
21066
|
+
var eventSchema = createSelectSchema(events, {
|
|
21067
|
+
startAt: exports_external.coerce.date(),
|
|
21068
|
+
endAt: exports_external.coerce.date(),
|
|
21069
|
+
remoteUpdatedAt: exports_external.coerce.date().nullable(),
|
|
21070
|
+
createdAt: exports_external.coerce.date(),
|
|
21071
|
+
updatedAt: exports_external.coerce.date()
|
|
21072
|
+
});
|
|
21073
|
+
var eventViewSchema = eventSchema.extend({
|
|
21074
|
+
title: exports_external.string(),
|
|
21075
|
+
busyForPlacement: exports_external.boolean()
|
|
21076
|
+
});
|
|
21077
|
+
var calendarConnectionCalendarSchema = createSelectSchema(calendarConnectionCalendars, {
|
|
21078
|
+
createdAt: exports_external.coerce.date(),
|
|
21079
|
+
updatedAt: exports_external.coerce.date()
|
|
21080
|
+
});
|
|
21081
|
+
var updateCalendarConnectionCalendarInputSchema = exports_external.object({
|
|
21082
|
+
showInDo: exports_external.boolean().optional(),
|
|
21083
|
+
countsAsBusy: exports_external.boolean().optional()
|
|
21084
|
+
});
|
|
21017
21085
|
// ../../packages/schema/src/contracts/api-keys.ts
|
|
21018
21086
|
var apiKeyScopeSchema = exports_external.enum([
|
|
21019
21087
|
"webhooks:read",
|
|
@@ -24241,7 +24309,7 @@ function parseCapture2(input, now) {
|
|
|
24241
24309
|
|
|
24242
24310
|
// src/meta.ts
|
|
24243
24311
|
var CLI_NAME = "do";
|
|
24244
|
-
var VERSION = "1.
|
|
24312
|
+
var VERSION = "1.109.0";
|
|
24245
24313
|
var API_PREFIX = "/api/v1";
|
|
24246
24314
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
24247
24315
|
|