@robbeverhelst/do 1.292.0 → 1.293.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.
Files changed (2) hide show
  1. package/dist/do.js +35 -2
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -3976,7 +3976,9 @@ var notificationType = pgEnum("notification_type", [
3976
3976
  "bank_link",
3977
3977
  "import_failed",
3978
3978
  "animal_ask",
3979
- "life_block"
3979
+ "life_block",
3980
+ "animal_alert",
3981
+ "health_checkin"
3980
3982
  ]);
3981
3983
  var notificationDomain = pgEnum("notification_domain", [
3982
3984
  "task",
@@ -4094,6 +4096,37 @@ var notificationReceipts = pgTable("notification_receipts", {
4094
4096
  undoneAt: timestamp("undone_at", { withTimezone: true }),
4095
4097
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
4096
4098
  }, (t) => [unique("notification_receipts_action_uniq").on(t.notificationId, t.actionIndex)]);
4099
+ var telegramLinks = pgTable("telegram_links", {
4100
+ id: text("id").primaryKey(),
4101
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
4102
+ userId: text("user_id").notNull().references(() => users.id),
4103
+ code: text("code"),
4104
+ codeExpiresAt: timestamp("code_expires_at", { withTimezone: true }),
4105
+ chatId: text("chat_id"),
4106
+ threadId: integer("thread_id"),
4107
+ chatTitle: text("chat_title"),
4108
+ telegramUserId: text("telegram_user_id"),
4109
+ linkedAt: timestamp("linked_at", { withTimezone: true }),
4110
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
4111
+ }, (t) => [
4112
+ unique("telegram_links_member_uniq").on(t.tenantId, t.userId),
4113
+ unique("telegram_links_code_uniq").on(t.code)
4114
+ ]);
4115
+ var telegramMessages = pgTable("telegram_messages", {
4116
+ id: text("id").primaryKey(),
4117
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
4118
+ userId: text("user_id").notNull().references(() => users.id),
4119
+ notificationId: text("notification_id").notNull().references(() => notifications.id, { onDelete: "cascade" }),
4120
+ kind: text("kind").$type().notNull(),
4121
+ chatId: text("chat_id").notNull(),
4122
+ messageId: bigint("message_id", { mode: "number" }),
4123
+ buttons: jsonb("buttons").$type().notNull().default([]),
4124
+ receiptId: text("receipt_id"),
4125
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
4126
+ editedAt: timestamp("edited_at", { withTimezone: true })
4127
+ }, (t) => [
4128
+ uniqueIndex("telegram_messages_notification_uniq").on(t.notificationId).where(sql`${t.kind} <> 'receipt'`)
4129
+ ]);
4097
4130
 
4098
4131
  // ../../packages/schema/src/db/foods.ts
4099
4132
  var foodSource = pgEnum("food_source", ["nevo", "usda", "off", "nubel"]);
@@ -28774,7 +28807,7 @@ function parseCapture2(input, now) {
28774
28807
 
28775
28808
  // src/meta.ts
28776
28809
  var CLI_NAME = "do";
28777
- var VERSION = "1.292.0";
28810
+ var VERSION = "1.293.0";
28778
28811
  var API_PREFIX = "/api/v1";
28779
28812
  var DEFAULT_API_URL = "http://localhost:3001";
28780
28813
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.292.0",
3
+ "version": "1.293.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "homepage": "https://github.com/robbeverhelst/do/tree/main/apps/cli",