@remit/drizzle-service 0.0.91 → 0.0.92
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/package.json
CHANGED
|
@@ -28,6 +28,11 @@ function rowToCalendar(
|
|
|
28
28
|
source: row.source,
|
|
29
29
|
timezone: row.timezone,
|
|
30
30
|
syncSequence: row.syncSequence,
|
|
31
|
+
subscriptionUrl: row.subscriptionUrl,
|
|
32
|
+
subscriptionEnabled: row.subscriptionEnabled,
|
|
33
|
+
subscriptionCheckedAt: row.subscriptionCheckedAt,
|
|
34
|
+
subscriptionFetchedAt: row.subscriptionFetchedAt,
|
|
35
|
+
subscriptionError: row.subscriptionError,
|
|
31
36
|
createdAt: row.createdAt,
|
|
32
37
|
updatedAt: row.updatedAt,
|
|
33
38
|
};
|
|
@@ -60,6 +65,8 @@ export class CalendarCollectionRepo implements ICalendarCollectionRepository {
|
|
|
60
65
|
componentSet: input.componentSet ?? "VeventOnly",
|
|
61
66
|
source: input.source ?? "UserCreated",
|
|
62
67
|
timezone: input.timezone ?? "",
|
|
68
|
+
subscriptionUrl: input.subscriptionUrl ?? "",
|
|
69
|
+
subscriptionEnabled: input.subscriptionEnabled ?? false,
|
|
63
70
|
syncSequence: 0,
|
|
64
71
|
createdAt: now,
|
|
65
72
|
updatedAt: now,
|
|
@@ -94,6 +101,8 @@ export class CalendarCollectionRepo implements ICalendarCollectionRepository {
|
|
|
94
101
|
componentSet: input.componentSet ?? "VeventOnly",
|
|
95
102
|
source: input.source ?? "UserCreated",
|
|
96
103
|
timezone: input.timezone ?? "",
|
|
104
|
+
subscriptionUrl: input.subscriptionUrl ?? "",
|
|
105
|
+
subscriptionEnabled: input.subscriptionEnabled ?? false,
|
|
97
106
|
syncSequence: 0,
|
|
98
107
|
createdAt: now,
|
|
99
108
|
updatedAt: now,
|
|
@@ -165,6 +174,20 @@ export class CalendarCollectionRepo implements ICalendarCollectionRepository {
|
|
|
165
174
|
return rows.map(rowToCalendar);
|
|
166
175
|
}
|
|
167
176
|
|
|
177
|
+
async listEnabledSubscriptions(): Promise<CalendarCollectionItem[]> {
|
|
178
|
+
const rows = await this.db
|
|
179
|
+
.select()
|
|
180
|
+
.from(calendarTable)
|
|
181
|
+
.where(
|
|
182
|
+
and(
|
|
183
|
+
eq(calendarTable.source, "Subscribed"),
|
|
184
|
+
eq(calendarTable.subscriptionEnabled, true),
|
|
185
|
+
),
|
|
186
|
+
)
|
|
187
|
+
.orderBy(asc(calendarTable.calendarId));
|
|
188
|
+
return rows.map(rowToCalendar);
|
|
189
|
+
}
|
|
190
|
+
|
|
168
191
|
async findByUrlSegment(
|
|
169
192
|
accountConfigId: string,
|
|
170
193
|
urlSegment: string,
|