@checkstack/integration-backend 0.0.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,85 @@
1
+ # @checkstack/integration-backend
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - d20d274: Initial release of all @checkstack packages. Rebranded from Checkmate to Checkstack with new npm organization @checkstack and domain checkstack.dev.
8
+ - Updated dependencies [d20d274]
9
+ - @checkstack/backend-api@0.0.2
10
+ - @checkstack/command-backend@0.0.2
11
+ - @checkstack/common@0.0.2
12
+ - @checkstack/integration-common@0.0.2
13
+ - @checkstack/queue-api@0.0.2
14
+ - @checkstack/signal-common@0.0.2
15
+
16
+ ## 0.1.0
17
+
18
+ ### Minor Changes
19
+
20
+ - 4c5aa9e: Fix `IntegrationProvider.testConnection` generic type
21
+
22
+ - **Breaking**: `testConnection` now receives `TConnection` (connection config) instead of `TConfig` (subscription config)
23
+ - **Breaking**: `RegisteredIntegrationProvider` now includes `TConnection` generic parameter
24
+ - Removed `testConnection` from webhook provider (providers without `connectionSchema` cannot have `testConnection`)
25
+ - Fixed Jira provider to use `JiraConnectionConfig` directly in `testConnection`
26
+
27
+ This aligns the interface with the actual behavior: `testConnection` tests connection credentials, not subscription configuration.
28
+
29
+ - a65e002: Add command palette commands and deep-linking support
30
+
31
+ **Backend Changes:**
32
+
33
+ - `healthcheck-backend`: Add "Manage Health Checks" (⇧⌘H) and "Create Health Check" commands
34
+ - `catalog-backend`: Add "Manage Systems" (⇧⌘S) and "Create System" commands
35
+ - `integration-backend`: Add "Manage Integrations" (⇧⌘G), "Create Integration Subscription", and "View Integration Logs" commands
36
+ - `auth-backend`: Add "Manage Users" (⇧⌘U), "Create User", "Manage Roles", and "Manage Applications" commands
37
+ - `command-backend`: Auto-cleanup command registrations when plugins are deregistered
38
+
39
+ **Frontend Changes:**
40
+
41
+ - `HealthCheckConfigPage`: Handle `?action=create` URL parameter
42
+ - `CatalogConfigPage`: Handle `?action=create` URL parameter
43
+ - `IntegrationsPage`: Handle `?action=create` URL parameter
44
+ - `AuthSettingsPage`: Handle `?tab=` and `?action=create` URL parameters
45
+
46
+ ### Patch Changes
47
+
48
+ - a65e002: Add compile-time type safety for Lucide icon names
49
+
50
+ - Add `LucideIconName` type and `lucideIconSchema` Zod schema to `@checkstack/common`
51
+ - Update backend interfaces (`AuthStrategy`, `NotificationStrategy`, `IntegrationProvider`, `CommandDefinition`) to use `LucideIconName`
52
+ - Update RPC contracts to use `lucideIconSchema` for proper type inference across RPC boundaries
53
+ - Simplify `SocialProviderButton` to use `DynamicIcon` directly (removes 30+ lines of pascalCase conversion)
54
+ - Replace static `iconMap` in `SearchDialog` with `DynamicIcon` for dynamic icon rendering
55
+ - Add fallback handling in `DynamicIcon` when icon name isn't found
56
+ - Fix legacy kebab-case icon names to PascalCase: `mail`→`Mail`, `send`→`Send`, `github`→`Github`, `key-round`→`KeyRound`, `network`→`Network`, `AlertCircle`→`CircleAlert`
57
+
58
+ - Updated dependencies [b4eb432]
59
+ - Updated dependencies [a65e002]
60
+ - Updated dependencies [a65e002]
61
+ - @checkstack/backend-api@1.1.0
62
+ - @checkstack/common@0.2.0
63
+ - @checkstack/command-backend@0.1.0
64
+ - @checkstack/queue-api@1.0.1
65
+ - @checkstack/integration-common@0.1.1
66
+ - @checkstack/signal-common@0.1.1
67
+
68
+ ## 0.0.2
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [ffc28f6]
73
+ - Updated dependencies [e4d83fc]
74
+ - Updated dependencies [4dd644d]
75
+ - Updated dependencies [71275dd]
76
+ - Updated dependencies [ae19ff6]
77
+ - Updated dependencies [b55fae6]
78
+ - Updated dependencies [b354ab3]
79
+ - Updated dependencies [8e889b4]
80
+ - Updated dependencies [81f3f85]
81
+ - @checkstack/common@0.1.0
82
+ - @checkstack/backend-api@1.0.0
83
+ - @checkstack/queue-api@1.0.0
84
+ - @checkstack/integration-common@0.1.0
85
+ - @checkstack/signal-common@0.1.0
@@ -0,0 +1,28 @@
1
+ CREATE TABLE "delivery_logs" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "subscription_id" text NOT NULL,
4
+ "event_type" text NOT NULL,
5
+ "event_payload" jsonb NOT NULL,
6
+ "status" text NOT NULL,
7
+ "attempts" integer DEFAULT 0 NOT NULL,
8
+ "last_attempt_at" timestamp,
9
+ "next_retry_at" timestamp,
10
+ "external_id" text,
11
+ "error_message" text,
12
+ "created_at" timestamp DEFAULT now() NOT NULL
13
+ );
14
+ --> statement-breakpoint
15
+ CREATE TABLE "webhook_subscriptions" (
16
+ "id" text PRIMARY KEY NOT NULL,
17
+ "name" text NOT NULL,
18
+ "description" text,
19
+ "provider_id" text NOT NULL,
20
+ "provider_config" jsonb NOT NULL,
21
+ "event_types" text[] DEFAULT '{}' NOT NULL,
22
+ "system_filter" text[],
23
+ "enabled" boolean DEFAULT true NOT NULL,
24
+ "created_at" timestamp DEFAULT now() NOT NULL,
25
+ "updated_at" timestamp DEFAULT now() NOT NULL
26
+ );
27
+ --> statement-breakpoint
28
+ ALTER TABLE "delivery_logs" ADD CONSTRAINT "delivery_logs_subscription_id_webhook_subscriptions_id_fk" FOREIGN KEY ("subscription_id") REFERENCES "webhook_subscriptions"("id") ON DELETE cascade ON UPDATE no action;
@@ -0,0 +1,2 @@
1
+ ALTER TABLE "webhook_subscriptions" ADD COLUMN "event_id" text NOT NULL;--> statement-breakpoint
2
+ ALTER TABLE "webhook_subscriptions" DROP COLUMN "event_types";
@@ -0,0 +1,191 @@
1
+ {
2
+ "id": "08a26305-2bc2-4667-9dbd-4fe54401e930",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.delivery_logs": {
8
+ "name": "delivery_logs",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "subscription_id": {
18
+ "name": "subscription_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "event_type": {
24
+ "name": "event_type",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "event_payload": {
30
+ "name": "event_payload",
31
+ "type": "jsonb",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "status": {
36
+ "name": "status",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "attempts": {
42
+ "name": "attempts",
43
+ "type": "integer",
44
+ "primaryKey": false,
45
+ "notNull": true,
46
+ "default": 0
47
+ },
48
+ "last_attempt_at": {
49
+ "name": "last_attempt_at",
50
+ "type": "timestamp",
51
+ "primaryKey": false,
52
+ "notNull": false
53
+ },
54
+ "next_retry_at": {
55
+ "name": "next_retry_at",
56
+ "type": "timestamp",
57
+ "primaryKey": false,
58
+ "notNull": false
59
+ },
60
+ "external_id": {
61
+ "name": "external_id",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "error_message": {
67
+ "name": "error_message",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "created_at": {
73
+ "name": "created_at",
74
+ "type": "timestamp",
75
+ "primaryKey": false,
76
+ "notNull": true,
77
+ "default": "now()"
78
+ }
79
+ },
80
+ "indexes": {},
81
+ "foreignKeys": {
82
+ "delivery_logs_subscription_id_webhook_subscriptions_id_fk": {
83
+ "name": "delivery_logs_subscription_id_webhook_subscriptions_id_fk",
84
+ "tableFrom": "delivery_logs",
85
+ "tableTo": "webhook_subscriptions",
86
+ "columnsFrom": [
87
+ "subscription_id"
88
+ ],
89
+ "columnsTo": [
90
+ "id"
91
+ ],
92
+ "onDelete": "cascade",
93
+ "onUpdate": "no action"
94
+ }
95
+ },
96
+ "compositePrimaryKeys": {},
97
+ "uniqueConstraints": {},
98
+ "policies": {},
99
+ "checkConstraints": {},
100
+ "isRLSEnabled": false
101
+ },
102
+ "public.webhook_subscriptions": {
103
+ "name": "webhook_subscriptions",
104
+ "schema": "",
105
+ "columns": {
106
+ "id": {
107
+ "name": "id",
108
+ "type": "text",
109
+ "primaryKey": true,
110
+ "notNull": true
111
+ },
112
+ "name": {
113
+ "name": "name",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true
117
+ },
118
+ "description": {
119
+ "name": "description",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": false
123
+ },
124
+ "provider_id": {
125
+ "name": "provider_id",
126
+ "type": "text",
127
+ "primaryKey": false,
128
+ "notNull": true
129
+ },
130
+ "provider_config": {
131
+ "name": "provider_config",
132
+ "type": "jsonb",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "event_types": {
137
+ "name": "event_types",
138
+ "type": "text[]",
139
+ "primaryKey": false,
140
+ "notNull": true,
141
+ "default": "'{}'"
142
+ },
143
+ "system_filter": {
144
+ "name": "system_filter",
145
+ "type": "text[]",
146
+ "primaryKey": false,
147
+ "notNull": false
148
+ },
149
+ "enabled": {
150
+ "name": "enabled",
151
+ "type": "boolean",
152
+ "primaryKey": false,
153
+ "notNull": true,
154
+ "default": true
155
+ },
156
+ "created_at": {
157
+ "name": "created_at",
158
+ "type": "timestamp",
159
+ "primaryKey": false,
160
+ "notNull": true,
161
+ "default": "now()"
162
+ },
163
+ "updated_at": {
164
+ "name": "updated_at",
165
+ "type": "timestamp",
166
+ "primaryKey": false,
167
+ "notNull": true,
168
+ "default": "now()"
169
+ }
170
+ },
171
+ "indexes": {},
172
+ "foreignKeys": {},
173
+ "compositePrimaryKeys": {},
174
+ "uniqueConstraints": {},
175
+ "policies": {},
176
+ "checkConstraints": {},
177
+ "isRLSEnabled": false
178
+ }
179
+ },
180
+ "enums": {},
181
+ "schemas": {},
182
+ "sequences": {},
183
+ "roles": {},
184
+ "policies": {},
185
+ "views": {},
186
+ "_meta": {
187
+ "columns": {},
188
+ "schemas": {},
189
+ "tables": {}
190
+ }
191
+ }
@@ -0,0 +1,190 @@
1
+ {
2
+ "id": "c319dba0-f6ff-4aec-afc5-669167d50fd5",
3
+ "prevId": "08a26305-2bc2-4667-9dbd-4fe54401e930",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.delivery_logs": {
8
+ "name": "delivery_logs",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "subscription_id": {
18
+ "name": "subscription_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "event_type": {
24
+ "name": "event_type",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "event_payload": {
30
+ "name": "event_payload",
31
+ "type": "jsonb",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "status": {
36
+ "name": "status",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "attempts": {
42
+ "name": "attempts",
43
+ "type": "integer",
44
+ "primaryKey": false,
45
+ "notNull": true,
46
+ "default": 0
47
+ },
48
+ "last_attempt_at": {
49
+ "name": "last_attempt_at",
50
+ "type": "timestamp",
51
+ "primaryKey": false,
52
+ "notNull": false
53
+ },
54
+ "next_retry_at": {
55
+ "name": "next_retry_at",
56
+ "type": "timestamp",
57
+ "primaryKey": false,
58
+ "notNull": false
59
+ },
60
+ "external_id": {
61
+ "name": "external_id",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "error_message": {
67
+ "name": "error_message",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "created_at": {
73
+ "name": "created_at",
74
+ "type": "timestamp",
75
+ "primaryKey": false,
76
+ "notNull": true,
77
+ "default": "now()"
78
+ }
79
+ },
80
+ "indexes": {},
81
+ "foreignKeys": {
82
+ "delivery_logs_subscription_id_webhook_subscriptions_id_fk": {
83
+ "name": "delivery_logs_subscription_id_webhook_subscriptions_id_fk",
84
+ "tableFrom": "delivery_logs",
85
+ "tableTo": "webhook_subscriptions",
86
+ "columnsFrom": [
87
+ "subscription_id"
88
+ ],
89
+ "columnsTo": [
90
+ "id"
91
+ ],
92
+ "onDelete": "cascade",
93
+ "onUpdate": "no action"
94
+ }
95
+ },
96
+ "compositePrimaryKeys": {},
97
+ "uniqueConstraints": {},
98
+ "policies": {},
99
+ "checkConstraints": {},
100
+ "isRLSEnabled": false
101
+ },
102
+ "public.webhook_subscriptions": {
103
+ "name": "webhook_subscriptions",
104
+ "schema": "",
105
+ "columns": {
106
+ "id": {
107
+ "name": "id",
108
+ "type": "text",
109
+ "primaryKey": true,
110
+ "notNull": true
111
+ },
112
+ "name": {
113
+ "name": "name",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true
117
+ },
118
+ "description": {
119
+ "name": "description",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": false
123
+ },
124
+ "provider_id": {
125
+ "name": "provider_id",
126
+ "type": "text",
127
+ "primaryKey": false,
128
+ "notNull": true
129
+ },
130
+ "provider_config": {
131
+ "name": "provider_config",
132
+ "type": "jsonb",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "event_id": {
137
+ "name": "event_id",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "system_filter": {
143
+ "name": "system_filter",
144
+ "type": "text[]",
145
+ "primaryKey": false,
146
+ "notNull": false
147
+ },
148
+ "enabled": {
149
+ "name": "enabled",
150
+ "type": "boolean",
151
+ "primaryKey": false,
152
+ "notNull": true,
153
+ "default": true
154
+ },
155
+ "created_at": {
156
+ "name": "created_at",
157
+ "type": "timestamp",
158
+ "primaryKey": false,
159
+ "notNull": true,
160
+ "default": "now()"
161
+ },
162
+ "updated_at": {
163
+ "name": "updated_at",
164
+ "type": "timestamp",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "default": "now()"
168
+ }
169
+ },
170
+ "indexes": {},
171
+ "foreignKeys": {},
172
+ "compositePrimaryKeys": {},
173
+ "uniqueConstraints": {},
174
+ "policies": {},
175
+ "checkConstraints": {},
176
+ "isRLSEnabled": false
177
+ }
178
+ },
179
+ "enums": {},
180
+ "schemas": {},
181
+ "sequences": {},
182
+ "roles": {},
183
+ "policies": {},
184
+ "views": {},
185
+ "_meta": {
186
+ "columns": {},
187
+ "schemas": {},
188
+ "tables": {}
189
+ }
190
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1767731111954,
9
+ "tag": "0000_glossy_red_hulk",
10
+ "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1767754210380,
16
+ "tag": "0001_rich_fixer",
17
+ "breakpoints": true
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,8 @@
1
+ export default {
2
+ dialect: "postgresql",
3
+ schema: "./src/schema.ts",
4
+ out: "./drizzle",
5
+ dbCredentials: {
6
+ url: process.env.DATABASE_URL || "",
7
+ },
8
+ };
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@checkstack/integration-backend",
3
+ "version": "0.0.2",
4
+ "type": "module",
5
+ "main": "src/index.ts",
6
+ "checkstack": {
7
+ "type": "backend"
8
+ },
9
+ "scripts": {
10
+ "typecheck": "tsc --noEmit",
11
+ "generate": "drizzle-kit generate",
12
+ "lint": "bun run lint:code",
13
+ "lint:code": "eslint . --max-warnings 0",
14
+ "test": "bun test"
15
+ },
16
+ "dependencies": {
17
+ "@checkstack/integration-common": "workspace:*",
18
+ "@checkstack/backend-api": "workspace:*",
19
+ "@checkstack/signal-common": "workspace:*",
20
+ "@checkstack/queue-api": "workspace:*",
21
+ "@checkstack/common": "workspace:*",
22
+ "@checkstack/command-backend": "workspace:*",
23
+ "drizzle-orm": "^0.45.1",
24
+ "zod": "^4.2.1"
25
+ },
26
+ "devDependencies": {
27
+ "@checkstack/drizzle-helper": "workspace:*",
28
+ "@checkstack/scripts": "workspace:*",
29
+ "@checkstack/tsconfig": "workspace:*",
30
+ "@checkstack/test-utils-backend": "workspace:*",
31
+ "@orpc/server": "^1.13.2",
32
+ "@types/node": "^20.0.0",
33
+ "drizzle-kit": "^0.31.8",
34
+ "typescript": "^5.0.0"
35
+ }
36
+ }