@rudderhq/db 0.3.5-canary.9 → 0.3.5

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 (58) hide show
  1. package/dist/migrations/0088_curly_sue_storm.sql +30 -0
  2. package/dist/migrations/0089_goofy_peter_parker.sql +1 -0
  3. package/dist/migrations/0090_chat_agent_runs.sql +110 -0
  4. package/dist/migrations/0091_disabled_intelligence_profiles.sql +8 -0
  5. package/dist/migrations/0092_white_tombstone.sql +139 -0
  6. package/dist/migrations/meta/0088_snapshot.json +15724 -0
  7. package/dist/migrations/meta/0089_snapshot.json +15730 -0
  8. package/dist/migrations/meta/0090_snapshot.json +15838 -0
  9. package/dist/migrations/meta/0091_snapshot.json +15838 -0
  10. package/dist/migrations/meta/0092_snapshot.json +17120 -0
  11. package/dist/migrations/meta/_journal.json +35 -0
  12. package/dist/schema/agent_integration_binding_tokens.d.ts +161 -0
  13. package/dist/schema/agent_integration_binding_tokens.d.ts.map +1 -0
  14. package/dist/schema/agent_integration_binding_tokens.js +21 -0
  15. package/dist/schema/agent_integration_binding_tokens.js.map +1 -0
  16. package/dist/schema/agent_integration_chat_bindings.d.ts +144 -0
  17. package/dist/schema/agent_integration_chat_bindings.d.ts.map +1 -0
  18. package/dist/schema/agent_integration_chat_bindings.js +22 -0
  19. package/dist/schema/agent_integration_chat_bindings.js.map +1 -0
  20. package/dist/schema/agent_integration_inbound_audit.d.ts +231 -0
  21. package/dist/schema/agent_integration_inbound_audit.d.ts.map +1 -0
  22. package/dist/schema/agent_integration_inbound_audit.js +23 -0
  23. package/dist/schema/agent_integration_inbound_audit.js.map +1 -0
  24. package/dist/schema/agent_integration_inbound_dedup.d.ts +110 -0
  25. package/dist/schema/agent_integration_inbound_dedup.d.ts.map +1 -0
  26. package/dist/schema/agent_integration_inbound_dedup.js +19 -0
  27. package/dist/schema/agent_integration_inbound_dedup.js.map +1 -0
  28. package/dist/schema/agent_integration_outbound_messages.d.ts +229 -0
  29. package/dist/schema/agent_integration_outbound_messages.d.ts.map +1 -0
  30. package/dist/schema/agent_integration_outbound_messages.js +30 -0
  31. package/dist/schema/agent_integration_outbound_messages.js.map +1 -0
  32. package/dist/schema/agent_integration_user_bindings.d.ts +178 -0
  33. package/dist/schema/agent_integration_user_bindings.d.ts.map +1 -0
  34. package/dist/schema/agent_integration_user_bindings.js +22 -0
  35. package/dist/schema/agent_integration_user_bindings.js.map +1 -0
  36. package/dist/schema/agent_integrations.d.ts +297 -0
  37. package/dist/schema/agent_integrations.d.ts.map +1 -0
  38. package/dist/schema/agent_integrations.js +31 -0
  39. package/dist/schema/agent_integrations.js.map +1 -0
  40. package/dist/schema/chat_messages.d.ts +17 -0
  41. package/dist/schema/chat_messages.d.ts.map +1 -1
  42. package/dist/schema/chat_messages.js +3 -0
  43. package/dist/schema/chat_messages.js.map +1 -1
  44. package/dist/schema/heartbeat_runs.d.ts +17 -0
  45. package/dist/schema/heartbeat_runs.d.ts.map +1 -1
  46. package/dist/schema/heartbeat_runs.js +10 -1
  47. package/dist/schema/heartbeat_runs.js.map +1 -1
  48. package/dist/schema/index.d.ts +8 -0
  49. package/dist/schema/index.d.ts.map +1 -1
  50. package/dist/schema/index.js +8 -0
  51. package/dist/schema/index.js.map +1 -1
  52. package/dist/schema/messenger_custom_groups.d.ts +304 -0
  53. package/dist/schema/messenger_custom_groups.d.ts.map +1 -0
  54. package/dist/schema/messenger_custom_groups.js +36 -0
  55. package/dist/schema/messenger_custom_groups.js.map +1 -0
  56. package/dist/schema/organization_intelligence_profiles.js +1 -1
  57. package/dist/schema/organization_intelligence_profiles.js.map +1 -1
  58. package/package.json +2 -2
@@ -0,0 +1,110 @@
1
+ export declare const agentIntegrationInboundDedup: import("drizzle-orm/pg-core").PgTableWithColumns<{
2
+ name: "agent_integration_inbound_dedup";
3
+ schema: undefined;
4
+ columns: {
5
+ orgId: import("drizzle-orm/pg-core").PgColumn<{
6
+ name: "org_id";
7
+ tableName: "agent_integration_inbound_dedup";
8
+ dataType: "string";
9
+ columnType: "PgUUID";
10
+ data: string;
11
+ driverParam: string;
12
+ notNull: false;
13
+ hasDefault: false;
14
+ isPrimaryKey: false;
15
+ isAutoincrement: false;
16
+ hasRuntimeDefault: false;
17
+ enumValues: undefined;
18
+ baseColumn: never;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }, {}, {}>;
22
+ integrationId: import("drizzle-orm/pg-core").PgColumn<{
23
+ name: "integration_id";
24
+ tableName: "agent_integration_inbound_dedup";
25
+ dataType: "string";
26
+ columnType: "PgUUID";
27
+ data: string;
28
+ driverParam: string;
29
+ notNull: false;
30
+ hasDefault: false;
31
+ isPrimaryKey: false;
32
+ isAutoincrement: false;
33
+ hasRuntimeDefault: false;
34
+ enumValues: undefined;
35
+ baseColumn: never;
36
+ identity: undefined;
37
+ generated: undefined;
38
+ }, {}, {}>;
39
+ provider: import("drizzle-orm/pg-core").PgColumn<{
40
+ name: "provider";
41
+ tableName: "agent_integration_inbound_dedup";
42
+ dataType: "string";
43
+ columnType: "PgText";
44
+ data: string;
45
+ driverParam: string;
46
+ notNull: true;
47
+ hasDefault: false;
48
+ isPrimaryKey: false;
49
+ isAutoincrement: false;
50
+ hasRuntimeDefault: false;
51
+ enumValues: [string, ...string[]];
52
+ baseColumn: never;
53
+ identity: undefined;
54
+ generated: undefined;
55
+ }, {}, {}>;
56
+ externalMessageId: import("drizzle-orm/pg-core").PgColumn<{
57
+ name: "external_message_id";
58
+ tableName: "agent_integration_inbound_dedup";
59
+ dataType: "string";
60
+ columnType: "PgText";
61
+ data: string;
62
+ driverParam: string;
63
+ notNull: true;
64
+ hasDefault: false;
65
+ isPrimaryKey: false;
66
+ isAutoincrement: false;
67
+ hasRuntimeDefault: false;
68
+ enumValues: [string, ...string[]];
69
+ baseColumn: never;
70
+ identity: undefined;
71
+ generated: undefined;
72
+ }, {}, {}>;
73
+ externalEventId: import("drizzle-orm/pg-core").PgColumn<{
74
+ name: "external_event_id";
75
+ tableName: "agent_integration_inbound_dedup";
76
+ dataType: "string";
77
+ columnType: "PgText";
78
+ data: string;
79
+ driverParam: string;
80
+ notNull: false;
81
+ hasDefault: false;
82
+ isPrimaryKey: false;
83
+ isAutoincrement: false;
84
+ hasRuntimeDefault: false;
85
+ enumValues: [string, ...string[]];
86
+ baseColumn: never;
87
+ identity: undefined;
88
+ generated: undefined;
89
+ }, {}, {}>;
90
+ receivedAt: import("drizzle-orm/pg-core").PgColumn<{
91
+ name: "received_at";
92
+ tableName: "agent_integration_inbound_dedup";
93
+ dataType: "date";
94
+ columnType: "PgTimestamp";
95
+ data: Date;
96
+ driverParam: string;
97
+ notNull: true;
98
+ hasDefault: true;
99
+ isPrimaryKey: false;
100
+ isAutoincrement: false;
101
+ hasRuntimeDefault: false;
102
+ enumValues: undefined;
103
+ baseColumn: never;
104
+ identity: undefined;
105
+ generated: undefined;
106
+ }, {}, {}>;
107
+ };
108
+ dialect: "pg";
109
+ }>;
110
+ //# sourceMappingURL=agent_integration_inbound_dedup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent_integration_inbound_dedup.d.ts","sourceRoot":"","sources":["../../src/schema/agent_integration_inbound_dedup.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBxC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { index, pgTable, primaryKey, text, timestamp, uuid } from "drizzle-orm/pg-core";
2
+ import { agentIntegrations } from "./agent_integrations.js";
3
+ import { organizations } from "./organizations.js";
4
+ export const agentIntegrationInboundDedup = pgTable("agent_integration_inbound_dedup", {
5
+ orgId: uuid("org_id").references(() => organizations.id, { onDelete: "cascade" }),
6
+ integrationId: uuid("integration_id").references(() => agentIntegrations.id, { onDelete: "cascade" }),
7
+ provider: text("provider").notNull(),
8
+ externalMessageId: text("external_message_id").notNull(),
9
+ externalEventId: text("external_event_id"),
10
+ receivedAt: timestamp("received_at", { withTimezone: true }).notNull().defaultNow(),
11
+ }, (table) => ({
12
+ pk: primaryKey({
13
+ name: "agent_integration_inbound_dedup_pk",
14
+ columns: [table.provider, table.externalMessageId],
15
+ }),
16
+ orgReceivedIdx: index("agent_integration_inbound_dedup_org_received_idx").on(table.orgId, table.receivedAt),
17
+ integrationReceivedIdx: index("agent_integration_inbound_dedup_integration_received_idx").on(table.integrationId, table.receivedAt),
18
+ }));
19
+ //# sourceMappingURL=agent_integration_inbound_dedup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent_integration_inbound_dedup.js","sourceRoot":"","sources":["../../src/schema/agent_integration_inbound_dedup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CACjD,iCAAiC,EACjC;IACE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjF,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACrG,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;IACpC,iBAAiB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,OAAO,EAAE;IACxD,eAAe,EAAE,IAAI,CAAC,mBAAmB,CAAC;IAC1C,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,EAAE;CACpF,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACV,EAAE,EAAE,UAAU,CAAC;QACb,IAAI,EAAE,oCAAoC;QAC1C,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC;KACnD,CAAC;IACF,cAAc,EAAE,KAAK,CAAC,kDAAkD,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;IAC3G,sBAAsB,EAAE,KAAK,CAAC,0DAA0D,CAAC,CAAC,EAAE,CAC1F,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,UAAU,CACjB;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,229 @@
1
+ export declare const agentIntegrationOutboundMessages: import("drizzle-orm/pg-core").PgTableWithColumns<{
2
+ name: "agent_integration_outbound_messages";
3
+ schema: undefined;
4
+ columns: {
5
+ id: import("drizzle-orm/pg-core").PgColumn<{
6
+ name: "id";
7
+ tableName: "agent_integration_outbound_messages";
8
+ dataType: "string";
9
+ columnType: "PgUUID";
10
+ data: string;
11
+ driverParam: string;
12
+ notNull: true;
13
+ hasDefault: true;
14
+ isPrimaryKey: true;
15
+ isAutoincrement: false;
16
+ hasRuntimeDefault: false;
17
+ enumValues: undefined;
18
+ baseColumn: never;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }, {}, {}>;
22
+ orgId: import("drizzle-orm/pg-core").PgColumn<{
23
+ name: "org_id";
24
+ tableName: "agent_integration_outbound_messages";
25
+ dataType: "string";
26
+ columnType: "PgUUID";
27
+ data: string;
28
+ driverParam: string;
29
+ notNull: true;
30
+ hasDefault: false;
31
+ isPrimaryKey: false;
32
+ isAutoincrement: false;
33
+ hasRuntimeDefault: false;
34
+ enumValues: undefined;
35
+ baseColumn: never;
36
+ identity: undefined;
37
+ generated: undefined;
38
+ }, {}, {}>;
39
+ integrationId: import("drizzle-orm/pg-core").PgColumn<{
40
+ name: "integration_id";
41
+ tableName: "agent_integration_outbound_messages";
42
+ dataType: "string";
43
+ columnType: "PgUUID";
44
+ data: string;
45
+ driverParam: string;
46
+ notNull: true;
47
+ hasDefault: false;
48
+ isPrimaryKey: false;
49
+ isAutoincrement: false;
50
+ hasRuntimeDefault: false;
51
+ enumValues: undefined;
52
+ baseColumn: never;
53
+ identity: undefined;
54
+ generated: undefined;
55
+ }, {}, {}>;
56
+ conversationId: import("drizzle-orm/pg-core").PgColumn<{
57
+ name: "conversation_id";
58
+ tableName: "agent_integration_outbound_messages";
59
+ dataType: "string";
60
+ columnType: "PgUUID";
61
+ data: string;
62
+ driverParam: string;
63
+ notNull: false;
64
+ hasDefault: false;
65
+ isPrimaryKey: false;
66
+ isAutoincrement: false;
67
+ hasRuntimeDefault: false;
68
+ enumValues: undefined;
69
+ baseColumn: never;
70
+ identity: undefined;
71
+ generated: undefined;
72
+ }, {}, {}>;
73
+ chatMessageId: import("drizzle-orm/pg-core").PgColumn<{
74
+ name: "chat_message_id";
75
+ tableName: "agent_integration_outbound_messages";
76
+ dataType: "string";
77
+ columnType: "PgUUID";
78
+ data: string;
79
+ driverParam: string;
80
+ notNull: false;
81
+ hasDefault: false;
82
+ isPrimaryKey: false;
83
+ isAutoincrement: false;
84
+ hasRuntimeDefault: false;
85
+ enumValues: undefined;
86
+ baseColumn: never;
87
+ identity: undefined;
88
+ generated: undefined;
89
+ }, {}, {}>;
90
+ issueId: import("drizzle-orm/pg-core").PgColumn<{
91
+ name: "issue_id";
92
+ tableName: "agent_integration_outbound_messages";
93
+ dataType: "string";
94
+ columnType: "PgUUID";
95
+ data: string;
96
+ driverParam: string;
97
+ notNull: false;
98
+ hasDefault: false;
99
+ isPrimaryKey: false;
100
+ isAutoincrement: false;
101
+ hasRuntimeDefault: false;
102
+ enumValues: undefined;
103
+ baseColumn: never;
104
+ identity: undefined;
105
+ generated: undefined;
106
+ }, {}, {}>;
107
+ runId: import("drizzle-orm/pg-core").PgColumn<{
108
+ name: "run_id";
109
+ tableName: "agent_integration_outbound_messages";
110
+ dataType: "string";
111
+ columnType: "PgUUID";
112
+ data: string;
113
+ driverParam: string;
114
+ notNull: false;
115
+ hasDefault: false;
116
+ isPrimaryKey: false;
117
+ isAutoincrement: false;
118
+ hasRuntimeDefault: false;
119
+ enumValues: undefined;
120
+ baseColumn: never;
121
+ identity: undefined;
122
+ generated: undefined;
123
+ }, {}, {}>;
124
+ externalChatId: import("drizzle-orm/pg-core").PgColumn<{
125
+ name: "external_chat_id";
126
+ tableName: "agent_integration_outbound_messages";
127
+ dataType: "string";
128
+ columnType: "PgText";
129
+ data: string;
130
+ driverParam: string;
131
+ notNull: true;
132
+ hasDefault: false;
133
+ isPrimaryKey: false;
134
+ isAutoincrement: false;
135
+ hasRuntimeDefault: false;
136
+ enumValues: [string, ...string[]];
137
+ baseColumn: never;
138
+ identity: undefined;
139
+ generated: undefined;
140
+ }, {}, {}>;
141
+ externalMessageId: import("drizzle-orm/pg-core").PgColumn<{
142
+ name: "external_message_id";
143
+ tableName: "agent_integration_outbound_messages";
144
+ dataType: "string";
145
+ columnType: "PgText";
146
+ data: string;
147
+ driverParam: string;
148
+ notNull: false;
149
+ hasDefault: false;
150
+ isPrimaryKey: false;
151
+ isAutoincrement: false;
152
+ hasRuntimeDefault: false;
153
+ enumValues: [string, ...string[]];
154
+ baseColumn: never;
155
+ identity: undefined;
156
+ generated: undefined;
157
+ }, {}, {}>;
158
+ status: import("drizzle-orm/pg-core").PgColumn<{
159
+ name: "status";
160
+ tableName: "agent_integration_outbound_messages";
161
+ dataType: "string";
162
+ columnType: "PgText";
163
+ data: string;
164
+ driverParam: string;
165
+ notNull: true;
166
+ hasDefault: true;
167
+ isPrimaryKey: false;
168
+ isAutoincrement: false;
169
+ hasRuntimeDefault: false;
170
+ enumValues: [string, ...string[]];
171
+ baseColumn: never;
172
+ identity: undefined;
173
+ generated: undefined;
174
+ }, {}, {}>;
175
+ lastPatchedAt: import("drizzle-orm/pg-core").PgColumn<{
176
+ name: "last_patched_at";
177
+ tableName: "agent_integration_outbound_messages";
178
+ dataType: "date";
179
+ columnType: "PgTimestamp";
180
+ data: Date;
181
+ driverParam: string;
182
+ notNull: false;
183
+ hasDefault: false;
184
+ isPrimaryKey: false;
185
+ isAutoincrement: false;
186
+ hasRuntimeDefault: false;
187
+ enumValues: undefined;
188
+ baseColumn: never;
189
+ identity: undefined;
190
+ generated: undefined;
191
+ }, {}, {}>;
192
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
193
+ name: "created_at";
194
+ tableName: "agent_integration_outbound_messages";
195
+ dataType: "date";
196
+ columnType: "PgTimestamp";
197
+ data: Date;
198
+ driverParam: string;
199
+ notNull: true;
200
+ hasDefault: true;
201
+ isPrimaryKey: false;
202
+ isAutoincrement: false;
203
+ hasRuntimeDefault: false;
204
+ enumValues: undefined;
205
+ baseColumn: never;
206
+ identity: undefined;
207
+ generated: undefined;
208
+ }, {}, {}>;
209
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
210
+ name: "updated_at";
211
+ tableName: "agent_integration_outbound_messages";
212
+ dataType: "date";
213
+ columnType: "PgTimestamp";
214
+ data: Date;
215
+ driverParam: string;
216
+ notNull: true;
217
+ hasDefault: true;
218
+ isPrimaryKey: false;
219
+ isAutoincrement: false;
220
+ hasRuntimeDefault: false;
221
+ enumValues: undefined;
222
+ baseColumn: never;
223
+ identity: undefined;
224
+ generated: undefined;
225
+ }, {}, {}>;
226
+ };
227
+ dialect: "pg";
228
+ }>;
229
+ //# sourceMappingURL=agent_integration_outbound_messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent_integration_outbound_messages.d.ts","sourceRoot":"","sources":["../../src/schema/agent_integration_outbound_messages.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B5C,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { index, pgTable, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
2
+ import { agentIntegrations } from "./agent_integrations.js";
3
+ import { chatConversations } from "./chat_conversations.js";
4
+ import { chatMessages } from "./chat_messages.js";
5
+ import { heartbeatRuns } from "./heartbeat_runs.js";
6
+ import { issues } from "./issues.js";
7
+ import { organizations } from "./organizations.js";
8
+ export const agentIntegrationOutboundMessages = pgTable("agent_integration_outbound_messages", {
9
+ id: uuid("id").primaryKey().defaultRandom(),
10
+ orgId: uuid("org_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
11
+ integrationId: uuid("integration_id")
12
+ .notNull()
13
+ .references(() => agentIntegrations.id, { onDelete: "cascade" }),
14
+ conversationId: uuid("conversation_id").references(() => chatConversations.id, { onDelete: "set null" }),
15
+ chatMessageId: uuid("chat_message_id").references(() => chatMessages.id, { onDelete: "set null" }),
16
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
17
+ runId: uuid("run_id").references(() => heartbeatRuns.id, { onDelete: "set null" }),
18
+ externalChatId: text("external_chat_id").notNull(),
19
+ externalMessageId: text("external_message_id"),
20
+ status: text("status").notNull().default("pending"),
21
+ lastPatchedAt: timestamp("last_patched_at", { withTimezone: true }),
22
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
23
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
24
+ }, (table) => ({
25
+ orgStatusIdx: index("agent_integration_outbound_messages_org_status_idx").on(table.orgId, table.status),
26
+ runIdx: index("agent_integration_outbound_messages_run_idx").on(table.runId),
27
+ issueIdx: index("agent_integration_outbound_messages_issue_idx").on(table.issueId),
28
+ externalMessageUq: uniqueIndex("agent_integration_outbound_messages_integration_external_message_uq").on(table.integrationId, table.externalMessageId),
29
+ }));
30
+ //# sourceMappingURL=agent_integration_outbound_messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent_integration_outbound_messages.js","sourceRoot":"","sources":["../../src/schema/agent_integration_outbound_messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,gCAAgC,GAAG,OAAO,CACrD,qCAAqC,EACrC;IACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE;IAC3C,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3F,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC;SAClC,OAAO,EAAE;SACT,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClE,cAAc,EAAE,IAAI,CAAC,iB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,6CAA6C,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5E,QAAQ,EAAE,KAAK,CAAC,+CAA+C,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IAClF,iBAAiB,EAAE,WAAW,CAAC,qEAAqE,CAAC,CAAC,EAAE,CACtG,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,iBAAiB,CACxB;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,178 @@
1
+ export declare const agentIntegrationUserBindings: import("drizzle-orm/pg-core").PgTableWithColumns<{
2
+ name: "agent_integration_user_bindings";
3
+ schema: undefined;
4
+ columns: {
5
+ id: import("drizzle-orm/pg-core").PgColumn<{
6
+ name: "id";
7
+ tableName: "agent_integration_user_bindings";
8
+ dataType: "string";
9
+ columnType: "PgUUID";
10
+ data: string;
11
+ driverParam: string;
12
+ notNull: true;
13
+ hasDefault: true;
14
+ isPrimaryKey: true;
15
+ isAutoincrement: false;
16
+ hasRuntimeDefault: false;
17
+ enumValues: undefined;
18
+ baseColumn: never;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }, {}, {}>;
22
+ orgId: import("drizzle-orm/pg-core").PgColumn<{
23
+ name: "org_id";
24
+ tableName: "agent_integration_user_bindings";
25
+ dataType: "string";
26
+ columnType: "PgUUID";
27
+ data: string;
28
+ driverParam: string;
29
+ notNull: true;
30
+ hasDefault: false;
31
+ isPrimaryKey: false;
32
+ isAutoincrement: false;
33
+ hasRuntimeDefault: false;
34
+ enumValues: undefined;
35
+ baseColumn: never;
36
+ identity: undefined;
37
+ generated: undefined;
38
+ }, {}, {}>;
39
+ integrationId: import("drizzle-orm/pg-core").PgColumn<{
40
+ name: "integration_id";
41
+ tableName: "agent_integration_user_bindings";
42
+ dataType: "string";
43
+ columnType: "PgUUID";
44
+ data: string;
45
+ driverParam: string;
46
+ notNull: true;
47
+ hasDefault: false;
48
+ isPrimaryKey: false;
49
+ isAutoincrement: false;
50
+ hasRuntimeDefault: false;
51
+ enumValues: undefined;
52
+ baseColumn: never;
53
+ identity: undefined;
54
+ generated: undefined;
55
+ }, {}, {}>;
56
+ userId: import("drizzle-orm/pg-core").PgColumn<{
57
+ name: "user_id";
58
+ tableName: "agent_integration_user_bindings";
59
+ dataType: "string";
60
+ columnType: "PgText";
61
+ data: string;
62
+ driverParam: string;
63
+ notNull: true;
64
+ hasDefault: false;
65
+ isPrimaryKey: false;
66
+ isAutoincrement: false;
67
+ hasRuntimeDefault: false;
68
+ enumValues: [string, ...string[]];
69
+ baseColumn: never;
70
+ identity: undefined;
71
+ generated: undefined;
72
+ }, {}, {}>;
73
+ externalOpenId: import("drizzle-orm/pg-core").PgColumn<{
74
+ name: "external_open_id";
75
+ tableName: "agent_integration_user_bindings";
76
+ dataType: "string";
77
+ columnType: "PgText";
78
+ data: string;
79
+ driverParam: string;
80
+ notNull: true;
81
+ hasDefault: false;
82
+ isPrimaryKey: false;
83
+ isAutoincrement: false;
84
+ hasRuntimeDefault: false;
85
+ enumValues: [string, ...string[]];
86
+ baseColumn: never;
87
+ identity: undefined;
88
+ generated: undefined;
89
+ }, {}, {}>;
90
+ externalUnionId: import("drizzle-orm/pg-core").PgColumn<{
91
+ name: "external_union_id";
92
+ tableName: "agent_integration_user_bindings";
93
+ dataType: "string";
94
+ columnType: "PgText";
95
+ data: string;
96
+ driverParam: string;
97
+ notNull: false;
98
+ hasDefault: false;
99
+ isPrimaryKey: false;
100
+ isAutoincrement: false;
101
+ hasRuntimeDefault: false;
102
+ enumValues: [string, ...string[]];
103
+ baseColumn: never;
104
+ identity: undefined;
105
+ generated: undefined;
106
+ }, {}, {}>;
107
+ boundAt: import("drizzle-orm/pg-core").PgColumn<{
108
+ name: "bound_at";
109
+ tableName: "agent_integration_user_bindings";
110
+ dataType: "date";
111
+ columnType: "PgTimestamp";
112
+ data: Date;
113
+ driverParam: string;
114
+ notNull: true;
115
+ hasDefault: true;
116
+ isPrimaryKey: false;
117
+ isAutoincrement: false;
118
+ hasRuntimeDefault: false;
119
+ enumValues: undefined;
120
+ baseColumn: never;
121
+ identity: undefined;
122
+ generated: undefined;
123
+ }, {}, {}>;
124
+ revokedAt: import("drizzle-orm/pg-core").PgColumn<{
125
+ name: "revoked_at";
126
+ tableName: "agent_integration_user_bindings";
127
+ dataType: "date";
128
+ columnType: "PgTimestamp";
129
+ data: Date;
130
+ driverParam: string;
131
+ notNull: false;
132
+ hasDefault: false;
133
+ isPrimaryKey: false;
134
+ isAutoincrement: false;
135
+ hasRuntimeDefault: false;
136
+ enumValues: undefined;
137
+ baseColumn: never;
138
+ identity: undefined;
139
+ generated: undefined;
140
+ }, {}, {}>;
141
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
142
+ name: "created_at";
143
+ tableName: "agent_integration_user_bindings";
144
+ dataType: "date";
145
+ columnType: "PgTimestamp";
146
+ data: Date;
147
+ driverParam: string;
148
+ notNull: true;
149
+ hasDefault: true;
150
+ isPrimaryKey: false;
151
+ isAutoincrement: false;
152
+ hasRuntimeDefault: false;
153
+ enumValues: undefined;
154
+ baseColumn: never;
155
+ identity: undefined;
156
+ generated: undefined;
157
+ }, {}, {}>;
158
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
159
+ name: "updated_at";
160
+ tableName: "agent_integration_user_bindings";
161
+ dataType: "date";
162
+ columnType: "PgTimestamp";
163
+ data: Date;
164
+ driverParam: string;
165
+ notNull: true;
166
+ hasDefault: true;
167
+ isPrimaryKey: false;
168
+ isAutoincrement: false;
169
+ hasRuntimeDefault: false;
170
+ enumValues: undefined;
171
+ baseColumn: never;
172
+ identity: undefined;
173
+ generated: undefined;
174
+ }, {}, {}>;
175
+ };
176
+ dialect: "pg";
177
+ }>;
178
+ //# sourceMappingURL=agent_integration_user_bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent_integration_user_bindings.d.ts","sourceRoot":"","sources":["../../src/schema/agent_integration_user_bindings.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BxC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { index, pgTable, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
2
+ import { agentIntegrations } from "./agent_integrations.js";
3
+ import { organizations } from "./organizations.js";
4
+ export const agentIntegrationUserBindings = pgTable("agent_integration_user_bindings", {
5
+ id: uuid("id").primaryKey().defaultRandom(),
6
+ orgId: uuid("org_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
7
+ integrationId: uuid("integration_id")
8
+ .notNull()
9
+ .references(() => agentIntegrations.id, { onDelete: "cascade" }),
10
+ userId: text("user_id").notNull(),
11
+ externalOpenId: text("external_open_id").notNull(),
12
+ externalUnionId: text("external_union_id"),
13
+ boundAt: timestamp("bound_at", { withTimezone: true }).notNull().defaultNow(),
14
+ revokedAt: timestamp("revoked_at", { withTimezone: true }),
15
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
16
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
17
+ }, (table) => ({
18
+ orgUserIdx: index("agent_integration_user_bindings_org_user_idx").on(table.orgId, table.userId),
19
+ integrationOpenIdUq: uniqueIndex("agent_integration_user_bindings_integration_open_id_uq").on(table.integrationId, table.externalOpenId),
20
+ integrationUnionIdIdx: index("agent_integration_user_bindings_integration_union_id_idx").on(table.integrationId, table.externalUnionId),
21
+ }));
22
+ //# sourceMappingURL=agent_integration_user_bindings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent_integration_user_bindings.js","sourceRoot":"","sources":["../../src/schema/agent_integration_user_bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK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