@rudderhq/db 0.7.2 → 0.7.3
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/backup-lib.d.ts.map +1 -1
- package/dist/backup-lib.js +59 -43
- package/dist/backup-lib.js.map +1 -1
- package/dist/backup-lib.test.js +122 -2
- package/dist/backup-lib.test.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +8 -3
- package/dist/client.js.map +1 -1
- package/dist/client.test.js +209 -4
- package/dist/client.test.js.map +1 -1
- package/dist/migrations/0149_app_builder_verified_source_ready.sql +3 -0
- package/dist/migrations/0150_rudder_plugins_v1.sql +114 -0
- package/dist/migrations/0151_agent_issue_creation_requests.sql +49 -0
- package/dist/migrations/meta/_journal.json +21 -0
- package/dist/schema/{plugin_jobs.d.ts → agent_issue_creation_requests.d.ts} +134 -142
- package/dist/schema/{plugin_jobs.d.ts.map → agent_issue_creation_requests.d.ts.map} +1 -1
- package/dist/schema/agent_issue_creation_requests.js +40 -0
- package/dist/schema/agent_issue_creation_requests.js.map +1 -0
- package/dist/schema/app_builder_apps.js +1 -1
- package/dist/schema/app_builder_apps.js.map +1 -1
- package/dist/schema/index.d.ts +2 -8
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -8
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/issues.d.ts.map +1 -1
- package/dist/schema/issues.js +4 -0
- package/dist/schema/issues.js.map +1 -1
- package/dist/schema/rudder_plugins.d.ts +978 -0
- package/dist/schema/rudder_plugins.d.ts.map +1 -0
- package/dist/schema/rudder_plugins.js +91 -0
- package/dist/schema/rudder_plugins.js.map +1 -0
- package/package.json +2 -2
- package/dist/schema/plugin_config.d.ts +0 -123
- package/dist/schema/plugin_config.d.ts.map +0 -1
- package/dist/schema/plugin_config.js +0 -26
- package/dist/schema/plugin_config.js.map +0 -1
- package/dist/schema/plugin_entities.d.ts +0 -213
- package/dist/schema/plugin_entities.d.ts.map +0 -1
- package/dist/schema/plugin_entities.js +0 -37
- package/dist/schema/plugin_entities.js.map +0 -1
- package/dist/schema/plugin_jobs.js +0 -83
- package/dist/schema/plugin_jobs.js.map +0 -1
- package/dist/schema/plugin_logs.d.ts +0 -125
- package/dist/schema/plugin_logs.d.ts.map +0 -1
- package/dist/schema/plugin_logs.js +0 -29
- package/dist/schema/plugin_logs.js.map +0 -1
- package/dist/schema/plugin_organization_settings.d.ts +0 -158
- package/dist/schema/plugin_organization_settings.d.ts.map +0 -1
- package/dist/schema/plugin_organization_settings.js +0 -34
- package/dist/schema/plugin_organization_settings.js.map +0 -1
- package/dist/schema/plugin_state.d.ts +0 -169
- package/dist/schema/plugin_state.d.ts.map +0 -1
- package/dist/schema/plugin_state.js +0 -68
- package/dist/schema/plugin_state.js.map +0 -1
- package/dist/schema/plugin_webhooks.d.ts +0 -239
- package/dist/schema/plugin_webhooks.d.ts.map +0 -1
- package/dist/schema/plugin_webhooks.js +0 -52
- package/dist/schema/plugin_webhooks.js.map +0 -1
- package/dist/schema/plugins.d.ts +0 -246
- package/dist/schema/plugins.d.ts.map +0 -1
- package/dist/schema/plugins.js +0 -31
- package/dist/schema/plugins.js.map +0 -1
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `plugin_webhook_deliveries` table — inbound webhook delivery history for plugins.
|
|
3
|
-
*
|
|
4
|
-
* When an external system sends an HTTP POST to a plugin's registered webhook
|
|
5
|
-
* endpoint (e.g. `/api/plugins/:pluginKey/webhooks/:webhookKey`), the server
|
|
6
|
-
* creates a row in this table before dispatching the payload to the plugin
|
|
7
|
-
* worker. This provides an auditable log of every delivery attempt.
|
|
8
|
-
*
|
|
9
|
-
* The `webhook_key` matches the key declared in the plugin manifest's
|
|
10
|
-
* `webhooks` array. `external_id` is an optional identifier supplied by the
|
|
11
|
-
* remote system (e.g. a GitHub delivery GUID) that can be used to detect
|
|
12
|
-
* and reject duplicate deliveries.
|
|
13
|
-
*
|
|
14
|
-
* Status values:
|
|
15
|
-
* - `pending` — received but not yet dispatched to the worker
|
|
16
|
-
* - `processing` — currently being handled by the plugin worker
|
|
17
|
-
* - `succeeded` — worker processed the payload successfully
|
|
18
|
-
* - `failed` — worker returned an error or timed out
|
|
19
|
-
*
|
|
20
|
-
* @see doc/engineering/PLUGIN_RUNTIME_CONTRACT.md — `plugin_webhook_deliveries`
|
|
21
|
-
*/
|
|
22
|
-
export declare const pluginWebhookDeliveries: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
23
|
-
name: "plugin_webhook_deliveries";
|
|
24
|
-
schema: undefined;
|
|
25
|
-
columns: {
|
|
26
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
27
|
-
name: "id";
|
|
28
|
-
tableName: "plugin_webhook_deliveries";
|
|
29
|
-
dataType: "string";
|
|
30
|
-
columnType: "PgUUID";
|
|
31
|
-
data: string;
|
|
32
|
-
driverParam: string;
|
|
33
|
-
notNull: true;
|
|
34
|
-
hasDefault: true;
|
|
35
|
-
isPrimaryKey: true;
|
|
36
|
-
isAutoincrement: false;
|
|
37
|
-
hasRuntimeDefault: false;
|
|
38
|
-
enumValues: undefined;
|
|
39
|
-
baseColumn: never;
|
|
40
|
-
identity: undefined;
|
|
41
|
-
generated: undefined;
|
|
42
|
-
}, {}, {}>;
|
|
43
|
-
pluginId: import("drizzle-orm/pg-core").PgColumn<{
|
|
44
|
-
name: "plugin_id";
|
|
45
|
-
tableName: "plugin_webhook_deliveries";
|
|
46
|
-
dataType: "string";
|
|
47
|
-
columnType: "PgUUID";
|
|
48
|
-
data: string;
|
|
49
|
-
driverParam: string;
|
|
50
|
-
notNull: true;
|
|
51
|
-
hasDefault: false;
|
|
52
|
-
isPrimaryKey: false;
|
|
53
|
-
isAutoincrement: false;
|
|
54
|
-
hasRuntimeDefault: false;
|
|
55
|
-
enumValues: undefined;
|
|
56
|
-
baseColumn: never;
|
|
57
|
-
identity: undefined;
|
|
58
|
-
generated: undefined;
|
|
59
|
-
}, {}, {}>;
|
|
60
|
-
webhookKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
61
|
-
name: "webhook_key";
|
|
62
|
-
tableName: "plugin_webhook_deliveries";
|
|
63
|
-
dataType: "string";
|
|
64
|
-
columnType: "PgText";
|
|
65
|
-
data: string;
|
|
66
|
-
driverParam: string;
|
|
67
|
-
notNull: true;
|
|
68
|
-
hasDefault: false;
|
|
69
|
-
isPrimaryKey: false;
|
|
70
|
-
isAutoincrement: false;
|
|
71
|
-
hasRuntimeDefault: false;
|
|
72
|
-
enumValues: [string, ...string[]];
|
|
73
|
-
baseColumn: never;
|
|
74
|
-
identity: undefined;
|
|
75
|
-
generated: undefined;
|
|
76
|
-
}, {}, {}>;
|
|
77
|
-
externalId: import("drizzle-orm/pg-core").PgColumn<{
|
|
78
|
-
name: "external_id";
|
|
79
|
-
tableName: "plugin_webhook_deliveries";
|
|
80
|
-
dataType: "string";
|
|
81
|
-
columnType: "PgText";
|
|
82
|
-
data: string;
|
|
83
|
-
driverParam: string;
|
|
84
|
-
notNull: false;
|
|
85
|
-
hasDefault: false;
|
|
86
|
-
isPrimaryKey: false;
|
|
87
|
-
isAutoincrement: false;
|
|
88
|
-
hasRuntimeDefault: false;
|
|
89
|
-
enumValues: [string, ...string[]];
|
|
90
|
-
baseColumn: never;
|
|
91
|
-
identity: undefined;
|
|
92
|
-
generated: undefined;
|
|
93
|
-
}, {}, {}>;
|
|
94
|
-
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
95
|
-
name: "status";
|
|
96
|
-
tableName: "plugin_webhook_deliveries";
|
|
97
|
-
dataType: "string";
|
|
98
|
-
columnType: "PgText";
|
|
99
|
-
data: "pending" | "success" | "failed";
|
|
100
|
-
driverParam: string;
|
|
101
|
-
notNull: true;
|
|
102
|
-
hasDefault: true;
|
|
103
|
-
isPrimaryKey: false;
|
|
104
|
-
isAutoincrement: false;
|
|
105
|
-
hasRuntimeDefault: false;
|
|
106
|
-
enumValues: [string, ...string[]];
|
|
107
|
-
baseColumn: never;
|
|
108
|
-
identity: undefined;
|
|
109
|
-
generated: undefined;
|
|
110
|
-
}, {}, {
|
|
111
|
-
$type: "pending" | "success" | "failed";
|
|
112
|
-
}>;
|
|
113
|
-
durationMs: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
|
-
name: "duration_ms";
|
|
115
|
-
tableName: "plugin_webhook_deliveries";
|
|
116
|
-
dataType: "number";
|
|
117
|
-
columnType: "PgInteger";
|
|
118
|
-
data: number;
|
|
119
|
-
driverParam: string | number;
|
|
120
|
-
notNull: false;
|
|
121
|
-
hasDefault: false;
|
|
122
|
-
isPrimaryKey: false;
|
|
123
|
-
isAutoincrement: false;
|
|
124
|
-
hasRuntimeDefault: false;
|
|
125
|
-
enumValues: undefined;
|
|
126
|
-
baseColumn: never;
|
|
127
|
-
identity: undefined;
|
|
128
|
-
generated: undefined;
|
|
129
|
-
}, {}, {}>;
|
|
130
|
-
error: import("drizzle-orm/pg-core").PgColumn<{
|
|
131
|
-
name: "error";
|
|
132
|
-
tableName: "plugin_webhook_deliveries";
|
|
133
|
-
dataType: "string";
|
|
134
|
-
columnType: "PgText";
|
|
135
|
-
data: string;
|
|
136
|
-
driverParam: string;
|
|
137
|
-
notNull: false;
|
|
138
|
-
hasDefault: false;
|
|
139
|
-
isPrimaryKey: false;
|
|
140
|
-
isAutoincrement: false;
|
|
141
|
-
hasRuntimeDefault: false;
|
|
142
|
-
enumValues: [string, ...string[]];
|
|
143
|
-
baseColumn: never;
|
|
144
|
-
identity: undefined;
|
|
145
|
-
generated: undefined;
|
|
146
|
-
}, {}, {}>;
|
|
147
|
-
payload: import("drizzle-orm/pg-core").PgColumn<{
|
|
148
|
-
name: "payload";
|
|
149
|
-
tableName: "plugin_webhook_deliveries";
|
|
150
|
-
dataType: "json";
|
|
151
|
-
columnType: "PgJsonb";
|
|
152
|
-
data: Record<string, unknown>;
|
|
153
|
-
driverParam: unknown;
|
|
154
|
-
notNull: true;
|
|
155
|
-
hasDefault: false;
|
|
156
|
-
isPrimaryKey: false;
|
|
157
|
-
isAutoincrement: false;
|
|
158
|
-
hasRuntimeDefault: false;
|
|
159
|
-
enumValues: undefined;
|
|
160
|
-
baseColumn: never;
|
|
161
|
-
identity: undefined;
|
|
162
|
-
generated: undefined;
|
|
163
|
-
}, {}, {
|
|
164
|
-
$type: Record<string, unknown>;
|
|
165
|
-
}>;
|
|
166
|
-
headers: import("drizzle-orm/pg-core").PgColumn<{
|
|
167
|
-
name: "headers";
|
|
168
|
-
tableName: "plugin_webhook_deliveries";
|
|
169
|
-
dataType: "json";
|
|
170
|
-
columnType: "PgJsonb";
|
|
171
|
-
data: Record<string, string>;
|
|
172
|
-
driverParam: unknown;
|
|
173
|
-
notNull: true;
|
|
174
|
-
hasDefault: true;
|
|
175
|
-
isPrimaryKey: false;
|
|
176
|
-
isAutoincrement: false;
|
|
177
|
-
hasRuntimeDefault: false;
|
|
178
|
-
enumValues: undefined;
|
|
179
|
-
baseColumn: never;
|
|
180
|
-
identity: undefined;
|
|
181
|
-
generated: undefined;
|
|
182
|
-
}, {}, {
|
|
183
|
-
$type: Record<string, string>;
|
|
184
|
-
}>;
|
|
185
|
-
startedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
186
|
-
name: "started_at";
|
|
187
|
-
tableName: "plugin_webhook_deliveries";
|
|
188
|
-
dataType: "date";
|
|
189
|
-
columnType: "PgTimestamp";
|
|
190
|
-
data: Date;
|
|
191
|
-
driverParam: string;
|
|
192
|
-
notNull: false;
|
|
193
|
-
hasDefault: false;
|
|
194
|
-
isPrimaryKey: false;
|
|
195
|
-
isAutoincrement: false;
|
|
196
|
-
hasRuntimeDefault: false;
|
|
197
|
-
enumValues: undefined;
|
|
198
|
-
baseColumn: never;
|
|
199
|
-
identity: undefined;
|
|
200
|
-
generated: undefined;
|
|
201
|
-
}, {}, {}>;
|
|
202
|
-
finishedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
203
|
-
name: "finished_at";
|
|
204
|
-
tableName: "plugin_webhook_deliveries";
|
|
205
|
-
dataType: "date";
|
|
206
|
-
columnType: "PgTimestamp";
|
|
207
|
-
data: Date;
|
|
208
|
-
driverParam: string;
|
|
209
|
-
notNull: false;
|
|
210
|
-
hasDefault: false;
|
|
211
|
-
isPrimaryKey: false;
|
|
212
|
-
isAutoincrement: false;
|
|
213
|
-
hasRuntimeDefault: false;
|
|
214
|
-
enumValues: undefined;
|
|
215
|
-
baseColumn: never;
|
|
216
|
-
identity: undefined;
|
|
217
|
-
generated: undefined;
|
|
218
|
-
}, {}, {}>;
|
|
219
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
220
|
-
name: "created_at";
|
|
221
|
-
tableName: "plugin_webhook_deliveries";
|
|
222
|
-
dataType: "date";
|
|
223
|
-
columnType: "PgTimestamp";
|
|
224
|
-
data: Date;
|
|
225
|
-
driverParam: string;
|
|
226
|
-
notNull: true;
|
|
227
|
-
hasDefault: true;
|
|
228
|
-
isPrimaryKey: false;
|
|
229
|
-
isAutoincrement: false;
|
|
230
|
-
hasRuntimeDefault: false;
|
|
231
|
-
enumValues: undefined;
|
|
232
|
-
baseColumn: never;
|
|
233
|
-
identity: undefined;
|
|
234
|
-
generated: undefined;
|
|
235
|
-
}, {}, {}>;
|
|
236
|
-
};
|
|
237
|
-
dialect: "pg";
|
|
238
|
-
}>;
|
|
239
|
-
//# sourceMappingURL=plugin_webhooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin_webhooks.d.ts","sourceRoot":"","sources":["../../src/schema/plugin_webhooks.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BnC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { index, integer, jsonb, pgTable, text, timestamp, uuid, } from "drizzle-orm/pg-core";
|
|
2
|
-
import { plugins } from "./plugins.js";
|
|
3
|
-
/**
|
|
4
|
-
* `plugin_webhook_deliveries` table — inbound webhook delivery history for plugins.
|
|
5
|
-
*
|
|
6
|
-
* When an external system sends an HTTP POST to a plugin's registered webhook
|
|
7
|
-
* endpoint (e.g. `/api/plugins/:pluginKey/webhooks/:webhookKey`), the server
|
|
8
|
-
* creates a row in this table before dispatching the payload to the plugin
|
|
9
|
-
* worker. This provides an auditable log of every delivery attempt.
|
|
10
|
-
*
|
|
11
|
-
* The `webhook_key` matches the key declared in the plugin manifest's
|
|
12
|
-
* `webhooks` array. `external_id` is an optional identifier supplied by the
|
|
13
|
-
* remote system (e.g. a GitHub delivery GUID) that can be used to detect
|
|
14
|
-
* and reject duplicate deliveries.
|
|
15
|
-
*
|
|
16
|
-
* Status values:
|
|
17
|
-
* - `pending` — received but not yet dispatched to the worker
|
|
18
|
-
* - `processing` — currently being handled by the plugin worker
|
|
19
|
-
* - `succeeded` — worker processed the payload successfully
|
|
20
|
-
* - `failed` — worker returned an error or timed out
|
|
21
|
-
*
|
|
22
|
-
* @see doc/engineering/PLUGIN_RUNTIME_CONTRACT.md — `plugin_webhook_deliveries`
|
|
23
|
-
*/
|
|
24
|
-
export const pluginWebhookDeliveries = pgTable("plugin_webhook_deliveries", {
|
|
25
|
-
id: uuid("id").primaryKey().defaultRandom(),
|
|
26
|
-
/** FK to the owning plugin. Cascades on delete. */
|
|
27
|
-
pluginId: uuid("plugin_id")
|
|
28
|
-
.notNull()
|
|
29
|
-
.references(() => plugins.id, { onDelete: "cascade" }),
|
|
30
|
-
/** Identifier matching the key in the plugin manifest's `webhooks` array. */
|
|
31
|
-
webhookKey: text("webhook_key").notNull(),
|
|
32
|
-
/** Optional de-duplication ID provided by the external system. */
|
|
33
|
-
externalId: text("external_id"),
|
|
34
|
-
/** Current delivery state. */
|
|
35
|
-
status: text("status").$type().notNull().default("pending"),
|
|
36
|
-
/** Wall-clock processing duration in milliseconds. Null until delivery finishes. */
|
|
37
|
-
durationMs: integer("duration_ms"),
|
|
38
|
-
/** Error message if `status === "failed"`. */
|
|
39
|
-
error: text("error"),
|
|
40
|
-
/** Raw JSON body of the inbound HTTP request. */
|
|
41
|
-
payload: jsonb("payload").$type().notNull(),
|
|
42
|
-
/** Relevant HTTP headers from the inbound request (e.g. signature headers). */
|
|
43
|
-
headers: jsonb("headers").$type().notNull().default({}),
|
|
44
|
-
startedAt: timestamp("started_at", { withTimezone: true }),
|
|
45
|
-
finishedAt: timestamp("finished_at", { withTimezone: true }),
|
|
46
|
-
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
47
|
-
}, (table) => ({
|
|
48
|
-
pluginIdx: index("plugin_webhook_deliveries_plugin_idx").on(table.pluginId),
|
|
49
|
-
statusIdx: index("plugin_webhook_deliveries_status_idx").on(table.status),
|
|
50
|
-
keyIdx: index("plugin_webhook_deliveries_key_idx").on(table.webhookKey),
|
|
51
|
-
}));
|
|
52
|
-
//# sourceMappingURL=plugin_webhooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin_webhooks.js","sourceRoot":"","sources":["../../src/schema/plugin_webhooks.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT,IAAI,GACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAC5C,2BAA2B,EAC3B;IACE,EAAE,EAAE,IAAI,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3E,SAAS,EAAE,KAAK,CAAC,sCAAsC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;IACzE,MAAM,EAAE,KAAK,CAAC,mCAAmC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;CACxE,CAAC,CACH,CAAC"}
|
package/dist/schema/plugins.d.ts
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import type { PaperclipPluginManifestV1 } from "@rudderhq/shared";
|
|
2
|
-
/**
|
|
3
|
-
* `plugins` table — stores one row per installed plugin.
|
|
4
|
-
*
|
|
5
|
-
* Each plugin is uniquely identified by `plugin_key` (derived from
|
|
6
|
-
* the manifest `id`). The full manifest is persisted as JSONB in
|
|
7
|
-
* `manifest_json` so the host can reconstruct capability and UI
|
|
8
|
-
* slot information without loading the plugin package.
|
|
9
|
-
*
|
|
10
|
-
* @see doc/engineering/PLUGIN_RUNTIME_CONTRACT.md
|
|
11
|
-
*/
|
|
12
|
-
export declare const plugins: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
13
|
-
name: "plugins";
|
|
14
|
-
schema: undefined;
|
|
15
|
-
columns: {
|
|
16
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
17
|
-
name: "id";
|
|
18
|
-
tableName: "plugins";
|
|
19
|
-
dataType: "string";
|
|
20
|
-
columnType: "PgUUID";
|
|
21
|
-
data: string;
|
|
22
|
-
driverParam: string;
|
|
23
|
-
notNull: true;
|
|
24
|
-
hasDefault: true;
|
|
25
|
-
isPrimaryKey: true;
|
|
26
|
-
isAutoincrement: false;
|
|
27
|
-
hasRuntimeDefault: false;
|
|
28
|
-
enumValues: undefined;
|
|
29
|
-
baseColumn: never;
|
|
30
|
-
identity: undefined;
|
|
31
|
-
generated: undefined;
|
|
32
|
-
}, {}, {}>;
|
|
33
|
-
pluginKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
34
|
-
name: "plugin_key";
|
|
35
|
-
tableName: "plugins";
|
|
36
|
-
dataType: "string";
|
|
37
|
-
columnType: "PgText";
|
|
38
|
-
data: string;
|
|
39
|
-
driverParam: string;
|
|
40
|
-
notNull: true;
|
|
41
|
-
hasDefault: false;
|
|
42
|
-
isPrimaryKey: false;
|
|
43
|
-
isAutoincrement: false;
|
|
44
|
-
hasRuntimeDefault: false;
|
|
45
|
-
enumValues: [string, ...string[]];
|
|
46
|
-
baseColumn: never;
|
|
47
|
-
identity: undefined;
|
|
48
|
-
generated: undefined;
|
|
49
|
-
}, {}, {}>;
|
|
50
|
-
packageName: import("drizzle-orm/pg-core").PgColumn<{
|
|
51
|
-
name: "package_name";
|
|
52
|
-
tableName: "plugins";
|
|
53
|
-
dataType: "string";
|
|
54
|
-
columnType: "PgText";
|
|
55
|
-
data: string;
|
|
56
|
-
driverParam: string;
|
|
57
|
-
notNull: true;
|
|
58
|
-
hasDefault: false;
|
|
59
|
-
isPrimaryKey: false;
|
|
60
|
-
isAutoincrement: false;
|
|
61
|
-
hasRuntimeDefault: false;
|
|
62
|
-
enumValues: [string, ...string[]];
|
|
63
|
-
baseColumn: never;
|
|
64
|
-
identity: undefined;
|
|
65
|
-
generated: undefined;
|
|
66
|
-
}, {}, {}>;
|
|
67
|
-
version: import("drizzle-orm/pg-core").PgColumn<{
|
|
68
|
-
name: "version";
|
|
69
|
-
tableName: "plugins";
|
|
70
|
-
dataType: "string";
|
|
71
|
-
columnType: "PgText";
|
|
72
|
-
data: string;
|
|
73
|
-
driverParam: string;
|
|
74
|
-
notNull: true;
|
|
75
|
-
hasDefault: false;
|
|
76
|
-
isPrimaryKey: false;
|
|
77
|
-
isAutoincrement: false;
|
|
78
|
-
hasRuntimeDefault: false;
|
|
79
|
-
enumValues: [string, ...string[]];
|
|
80
|
-
baseColumn: never;
|
|
81
|
-
identity: undefined;
|
|
82
|
-
generated: undefined;
|
|
83
|
-
}, {}, {}>;
|
|
84
|
-
apiVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
85
|
-
name: "api_version";
|
|
86
|
-
tableName: "plugins";
|
|
87
|
-
dataType: "number";
|
|
88
|
-
columnType: "PgInteger";
|
|
89
|
-
data: number;
|
|
90
|
-
driverParam: string | number;
|
|
91
|
-
notNull: true;
|
|
92
|
-
hasDefault: true;
|
|
93
|
-
isPrimaryKey: false;
|
|
94
|
-
isAutoincrement: false;
|
|
95
|
-
hasRuntimeDefault: false;
|
|
96
|
-
enumValues: undefined;
|
|
97
|
-
baseColumn: never;
|
|
98
|
-
identity: undefined;
|
|
99
|
-
generated: undefined;
|
|
100
|
-
}, {}, {}>;
|
|
101
|
-
categories: import("drizzle-orm/pg-core").PgColumn<{
|
|
102
|
-
name: "categories";
|
|
103
|
-
tableName: "plugins";
|
|
104
|
-
dataType: "json";
|
|
105
|
-
columnType: "PgJsonb";
|
|
106
|
-
data: ("automation" | "workspace" | "connector" | "ui")[];
|
|
107
|
-
driverParam: unknown;
|
|
108
|
-
notNull: true;
|
|
109
|
-
hasDefault: true;
|
|
110
|
-
isPrimaryKey: false;
|
|
111
|
-
isAutoincrement: false;
|
|
112
|
-
hasRuntimeDefault: false;
|
|
113
|
-
enumValues: undefined;
|
|
114
|
-
baseColumn: never;
|
|
115
|
-
identity: undefined;
|
|
116
|
-
generated: undefined;
|
|
117
|
-
}, {}, {
|
|
118
|
-
$type: ("automation" | "workspace" | "connector" | "ui")[];
|
|
119
|
-
}>;
|
|
120
|
-
manifestJson: import("drizzle-orm/pg-core").PgColumn<{
|
|
121
|
-
name: "manifest_json";
|
|
122
|
-
tableName: "plugins";
|
|
123
|
-
dataType: "json";
|
|
124
|
-
columnType: "PgJsonb";
|
|
125
|
-
data: PaperclipPluginManifestV1;
|
|
126
|
-
driverParam: unknown;
|
|
127
|
-
notNull: true;
|
|
128
|
-
hasDefault: false;
|
|
129
|
-
isPrimaryKey: false;
|
|
130
|
-
isAutoincrement: false;
|
|
131
|
-
hasRuntimeDefault: false;
|
|
132
|
-
enumValues: undefined;
|
|
133
|
-
baseColumn: never;
|
|
134
|
-
identity: undefined;
|
|
135
|
-
generated: undefined;
|
|
136
|
-
}, {}, {
|
|
137
|
-
$type: PaperclipPluginManifestV1;
|
|
138
|
-
}>;
|
|
139
|
-
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
140
|
-
name: "status";
|
|
141
|
-
tableName: "plugins";
|
|
142
|
-
dataType: "string";
|
|
143
|
-
columnType: "PgText";
|
|
144
|
-
data: "error" | "ready" | "disabled" | "installed" | "upgrade_pending" | "uninstalled";
|
|
145
|
-
driverParam: string;
|
|
146
|
-
notNull: true;
|
|
147
|
-
hasDefault: true;
|
|
148
|
-
isPrimaryKey: false;
|
|
149
|
-
isAutoincrement: false;
|
|
150
|
-
hasRuntimeDefault: false;
|
|
151
|
-
enumValues: [string, ...string[]];
|
|
152
|
-
baseColumn: never;
|
|
153
|
-
identity: undefined;
|
|
154
|
-
generated: undefined;
|
|
155
|
-
}, {}, {
|
|
156
|
-
$type: "error" | "ready" | "disabled" | "installed" | "upgrade_pending" | "uninstalled";
|
|
157
|
-
}>;
|
|
158
|
-
installOrder: import("drizzle-orm/pg-core").PgColumn<{
|
|
159
|
-
name: "install_order";
|
|
160
|
-
tableName: "plugins";
|
|
161
|
-
dataType: "number";
|
|
162
|
-
columnType: "PgInteger";
|
|
163
|
-
data: number;
|
|
164
|
-
driverParam: string | number;
|
|
165
|
-
notNull: false;
|
|
166
|
-
hasDefault: false;
|
|
167
|
-
isPrimaryKey: false;
|
|
168
|
-
isAutoincrement: false;
|
|
169
|
-
hasRuntimeDefault: false;
|
|
170
|
-
enumValues: undefined;
|
|
171
|
-
baseColumn: never;
|
|
172
|
-
identity: undefined;
|
|
173
|
-
generated: undefined;
|
|
174
|
-
}, {}, {}>;
|
|
175
|
-
packagePath: import("drizzle-orm/pg-core").PgColumn<{
|
|
176
|
-
name: "package_path";
|
|
177
|
-
tableName: "plugins";
|
|
178
|
-
dataType: "string";
|
|
179
|
-
columnType: "PgText";
|
|
180
|
-
data: string;
|
|
181
|
-
driverParam: string;
|
|
182
|
-
notNull: false;
|
|
183
|
-
hasDefault: false;
|
|
184
|
-
isPrimaryKey: false;
|
|
185
|
-
isAutoincrement: false;
|
|
186
|
-
hasRuntimeDefault: false;
|
|
187
|
-
enumValues: [string, ...string[]];
|
|
188
|
-
baseColumn: never;
|
|
189
|
-
identity: undefined;
|
|
190
|
-
generated: undefined;
|
|
191
|
-
}, {}, {}>;
|
|
192
|
-
lastError: import("drizzle-orm/pg-core").PgColumn<{
|
|
193
|
-
name: "last_error";
|
|
194
|
-
tableName: "plugins";
|
|
195
|
-
dataType: "string";
|
|
196
|
-
columnType: "PgText";
|
|
197
|
-
data: string;
|
|
198
|
-
driverParam: string;
|
|
199
|
-
notNull: false;
|
|
200
|
-
hasDefault: false;
|
|
201
|
-
isPrimaryKey: false;
|
|
202
|
-
isAutoincrement: false;
|
|
203
|
-
hasRuntimeDefault: false;
|
|
204
|
-
enumValues: [string, ...string[]];
|
|
205
|
-
baseColumn: never;
|
|
206
|
-
identity: undefined;
|
|
207
|
-
generated: undefined;
|
|
208
|
-
}, {}, {}>;
|
|
209
|
-
installedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
210
|
-
name: "installed_at";
|
|
211
|
-
tableName: "plugins";
|
|
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
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
227
|
-
name: "updated_at";
|
|
228
|
-
tableName: "plugins";
|
|
229
|
-
dataType: "date";
|
|
230
|
-
columnType: "PgTimestamp";
|
|
231
|
-
data: Date;
|
|
232
|
-
driverParam: string;
|
|
233
|
-
notNull: true;
|
|
234
|
-
hasDefault: true;
|
|
235
|
-
isPrimaryKey: false;
|
|
236
|
-
isAutoincrement: false;
|
|
237
|
-
hasRuntimeDefault: false;
|
|
238
|
-
enumValues: undefined;
|
|
239
|
-
baseColumn: never;
|
|
240
|
-
identity: undefined;
|
|
241
|
-
generated: undefined;
|
|
242
|
-
}, {}, {}>;
|
|
243
|
-
};
|
|
244
|
-
dialect: "pg";
|
|
245
|
-
}>;
|
|
246
|
-
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/schema/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAgC,MAAM,kBAAkB,CAAC;AAYhG;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBnB,CAAC"}
|
package/dist/schema/plugins.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { index, integer, jsonb, pgTable, text, timestamp, uniqueIndex, uuid, } from "drizzle-orm/pg-core";
|
|
2
|
-
/**
|
|
3
|
-
* `plugins` table — stores one row per installed plugin.
|
|
4
|
-
*
|
|
5
|
-
* Each plugin is uniquely identified by `plugin_key` (derived from
|
|
6
|
-
* the manifest `id`). The full manifest is persisted as JSONB in
|
|
7
|
-
* `manifest_json` so the host can reconstruct capability and UI
|
|
8
|
-
* slot information without loading the plugin package.
|
|
9
|
-
*
|
|
10
|
-
* @see doc/engineering/PLUGIN_RUNTIME_CONTRACT.md
|
|
11
|
-
*/
|
|
12
|
-
export const plugins = pgTable("plugins", {
|
|
13
|
-
id: uuid("id").primaryKey().defaultRandom(),
|
|
14
|
-
pluginKey: text("plugin_key").notNull(),
|
|
15
|
-
packageName: text("package_name").notNull(),
|
|
16
|
-
version: text("version").notNull(),
|
|
17
|
-
apiVersion: integer("api_version").notNull().default(1),
|
|
18
|
-
categories: jsonb("categories").$type().notNull().default([]),
|
|
19
|
-
manifestJson: jsonb("manifest_json").$type().notNull(),
|
|
20
|
-
status: text("status").$type().notNull().default("installed"),
|
|
21
|
-
installOrder: integer("install_order"),
|
|
22
|
-
/** Resolved package path for local-path installs; used to find worker entrypoint. */
|
|
23
|
-
packagePath: text("package_path"),
|
|
24
|
-
lastError: text("last_error"),
|
|
25
|
-
installedAt: timestamp("installed_at", { withTimezone: true }).notNull().defaultNow(),
|
|
26
|
-
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
27
|
-
}, (table) => ({
|
|
28
|
-
pluginKeyIdx: uniqueIndex("plugins_plugin_key_idx").on(table.pluginKey),
|
|
29
|
-
statusIdx: index("plugins_status_idx").on(table.status),
|
|
30
|
-
}));
|
|
31
|
-
//# sourceMappingURL=plugins.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/schema/plugins.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT,WAAW,EACX,IAAI,GACL,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAC5B,SAAS,EACT;IACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE;IAC3C,SAAS,EAAE,IAAI,CAAC,YAAY,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