@sixb/server 0.1.1 → 0.1.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/README.md +3 -3
- package/dist/auth/application-access.d.ts +2 -2
- package/dist/auth/application-access.d.ts.map +1 -1
- package/dist/auth/connector-callback-cookie.d.ts +12 -0
- package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
- package/dist/auth/guard.d.ts +3 -3
- package/dist/auth/guard.d.ts.map +1 -1
- package/dist/auth/public-routes.d.ts.map +1 -1
- package/dist/auth/scope.d.ts +13 -27
- package/dist/auth/scope.d.ts.map +1 -1
- package/dist/auth/session-cookies.d.ts +2 -2
- package/dist/auth/session-cookies.d.ts.map +1 -1
- package/dist/connectors/http.d.ts +16 -0
- package/dist/connectors/http.d.ts.map +1 -0
- package/dist/index.js +3293 -2704
- package/dist/index.js.map +55 -50
- package/dist/openapi/tags.d.ts +11 -3
- package/dist/openapi/tags.d.ts.map +1 -1
- package/dist/registerRoutes.d.ts +6 -2
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/action-runs.d.ts +21 -31
- package/dist/routes/action-runs.d.ts.map +1 -1
- package/dist/routes/actions.d.ts +9 -8
- package/dist/routes/actions.d.ts.map +1 -1
- package/dist/routes/agent-api-gateway.d.ts +2 -2
- package/dist/routes/agent-api-gateway.d.ts.map +1 -1
- package/dist/routes/agents.d.ts +130 -131
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +84 -84
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/connector-connection-runs.d.ts +794 -0
- package/dist/routes/connector-connection-runs.d.ts.map +1 -0
- package/dist/routes/connector-connections.d.ts +219 -0
- package/dist/routes/connector-connections.d.ts.map +1 -0
- package/dist/routes/connectors.d.ts +10 -4
- package/dist/routes/connectors.d.ts.map +1 -1
- package/dist/routes/datasets.d.ts +8 -4
- package/dist/routes/datasets.d.ts.map +1 -1
- package/dist/routes/events.d.ts +8 -8
- package/dist/routes/events.d.ts.map +1 -1
- package/dist/routes/files.d.ts +11 -10
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/links.d.ts +2 -2
- package/dist/routes/links.d.ts.map +1 -1
- package/dist/routes/logs.d.ts +5 -5
- package/dist/routes/logs.d.ts.map +1 -1
- package/dist/routes/objects.d.ts +34 -34
- package/dist/routes/objects.d.ts.map +1 -1
- package/dist/routes/ontology.d.ts +50 -50
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +24 -34
- package/dist/routes/pipelines.d.ts.map +1 -1
- package/dist/routes/project.d.ts +2 -2
- package/dist/routes/project.d.ts.map +1 -1
- package/dist/routes/projections.d.ts +131 -83
- package/dist/routes/projections.d.ts.map +1 -1
- package/dist/routes/rules.d.ts +6 -6
- package/dist/routes/rules.d.ts.map +1 -1
- package/dist/routes/status.d.ts +2 -2
- package/dist/routes/status.d.ts.map +1 -1
- package/dist/routes/syncs.d.ts +20 -25
- package/dist/routes/syncs.d.ts.map +1 -1
- package/dist/routes/telemetry.d.ts +2 -2
- package/dist/routes/telemetry.d.ts.map +1 -1
- package/dist/routes/webhook-runs.d.ts +9 -9
- package/dist/routes/webhook-runs.d.ts.map +1 -1
- package/dist/routes/webhooks.d.ts +2 -2
- package/dist/routes/webhooks.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +74 -48
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/ws/agents.d.ts +11 -5
- package/dist/routes/ws/agents.d.ts.map +1 -1
- package/dist/routes/ws/events.d.ts +8 -8
- package/dist/routes/ws/events.d.ts.map +1 -1
- package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
- package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
- package/dist/routes/ws/logs.d.ts +10 -10
- package/dist/routes/ws/logs.d.ts.map +1 -1
- package/dist/schemas/actions.d.ts +97 -202
- package/dist/schemas/actions.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +442 -439
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-usage.d.ts +34 -0
- package/dist/schemas/ai-usage.d.ts.map +1 -0
- package/dist/schemas/auth.d.ts +142 -142
- package/dist/schemas/common.d.ts +37 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/connectors.d.ts +713 -2
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/datasets.d.ts +2 -2
- package/dist/schemas/event-payloads.d.ts +6 -6
- package/dist/schemas/events.d.ts +34 -34
- package/dist/schemas/logs.d.ts +22 -22
- package/dist/schemas/objects.d.ts +10 -10
- package/dist/schemas/ontology.d.ts +118 -118
- package/dist/schemas/pipelines.d.ts +95 -190
- package/dist/schemas/pipelines.d.ts.map +1 -1
- package/dist/schemas/projections.d.ts +918 -563
- package/dist/schemas/projections.d.ts.map +1 -1
- package/dist/schemas/rules.d.ts +6 -6
- package/dist/schemas/status.d.ts +2 -2
- package/dist/schemas/syncs.d.ts +65 -108
- package/dist/schemas/syncs.d.ts.map +1 -1
- package/dist/schemas/webhook-runs.d.ts +41 -41
- package/dist/schemas/webhook-runs.d.ts.map +1 -1
- package/dist/schemas/workflows.d.ts +516 -183
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/server.d.ts +6 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/utils/http.d.ts +2 -0
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/ws.d.ts +4 -3
- package/dist/utils/ws.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/auth/access-token-boundary.ts +4 -4
- package/src/auth/application-access.ts +8 -9
- package/src/auth/connector-callback-cookie.ts +95 -0
- package/src/auth/guard.ts +11 -11
- package/src/auth/public-routes.ts +13 -0
- package/src/auth/scope.ts +26 -36
- package/src/auth/session-cookies.ts +3 -3
- package/src/connectors/http.ts +110 -0
- package/src/openapi/tags.ts +9 -1
- package/src/registerRoutes.ts +34 -23
- package/src/routes/action-runs.ts +39 -39
- package/src/routes/actions.ts +7 -13
- package/src/routes/agent-api-gateway.ts +41 -38
- package/src/routes/agents.ts +89 -200
- package/src/routes/auth.ts +87 -91
- package/src/routes/connector-connection-runs.ts +346 -0
- package/src/routes/connector-connections.ts +135 -0
- package/src/routes/connectors.ts +24 -12
- package/src/routes/datasets.ts +55 -54
- package/src/routes/events.ts +5 -5
- package/src/routes/files.ts +22 -30
- package/src/routes/links.ts +31 -35
- package/src/routes/logs.ts +6 -11
- package/src/routes/objects.ts +51 -114
- package/src/routes/ontology.ts +27 -38
- package/src/routes/pipelines.ts +28 -62
- package/src/routes/project.ts +3 -3
- package/src/routes/projections.ts +26 -38
- package/src/routes/rules.ts +11 -25
- package/src/routes/status.ts +5 -5
- package/src/routes/syncs.ts +19 -45
- package/src/routes/telemetry.ts +18 -29
- package/src/routes/webhook-runs.ts +5 -5
- package/src/routes/webhooks.ts +259 -341
- package/src/routes/workflows.ts +226 -248
- package/src/routes/ws/agents.ts +196 -66
- package/src/routes/ws/events.ts +11 -10
- package/src/routes/ws/log-subscription-hub.ts +6 -12
- package/src/routes/ws/logs.ts +13 -5
- package/src/schemas/actions.ts +58 -25
- package/src/schemas/agents.ts +19 -14
- package/src/schemas/ai-usage.ts +16 -0
- package/src/schemas/common.ts +24 -0
- package/src/schemas/connectors.ts +164 -0
- package/src/schemas/pipelines.ts +23 -15
- package/src/schemas/projections.ts +17 -3
- package/src/schemas/syncs.ts +13 -8
- package/src/schemas/webhook-runs.ts +10 -5
- package/src/schemas/workflows.ts +16 -6
- package/src/server.ts +65 -26
- package/src/utils/http.ts +34 -6
- package/src/utils/ws.ts +10 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { SixbFailure } from "@sixb/core";
|
|
1
2
|
import { z } from "zod";
|
|
2
|
-
export declare const WebhookRunStatusSchema: z.ZodEnum<["running", "succeeded", "failed"
|
|
3
|
-
export declare const WebhookDeliveryClaimResultSchema: z.ZodEnum<["claimed", "duplicate", "in_progress"]>;
|
|
3
|
+
export declare const WebhookRunStatusSchema: z.ZodEnum<["running", "succeeded", "failed"]>;
|
|
4
4
|
export declare const WebhookRunsQuerySchema: z.ZodObject<{
|
|
5
5
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
6
6
|
webhookId: z.ZodOptional<z.ZodString>;
|
|
7
|
-
status: z.ZodOptional<z.ZodEnum<["running", "succeeded", "failed"
|
|
7
|
+
status: z.ZodOptional<z.ZodEnum<["running", "succeeded", "failed"]>>;
|
|
8
8
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
9
9
|
startedAfter: z.ZodOptional<z.ZodString>;
|
|
10
10
|
startedBefore: z.ZodOptional<z.ZodString>;
|
|
@@ -12,22 +12,22 @@ export declare const WebhookRunsQuerySchema: z.ZodObject<{
|
|
|
12
12
|
offset: z.ZodOptional<z.ZodString>;
|
|
13
13
|
order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
status?: "running" | "succeeded" | "failed" |
|
|
15
|
+
status?: "running" | "succeeded" | "failed" | undefined;
|
|
16
|
+
startedAfter?: string | undefined;
|
|
17
|
+
startedBefore?: string | undefined;
|
|
16
18
|
limit?: string | undefined;
|
|
17
19
|
offset?: string | undefined;
|
|
18
20
|
order?: "asc" | "desc" | undefined;
|
|
19
|
-
startedAfter?: string | undefined;
|
|
20
|
-
startedBefore?: string | undefined;
|
|
21
21
|
connectorId?: string | undefined;
|
|
22
22
|
idempotencyKey?: string | undefined;
|
|
23
23
|
webhookId?: string | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
status?: "running" | "succeeded" | "failed" |
|
|
25
|
+
status?: "running" | "succeeded" | "failed" | undefined;
|
|
26
|
+
startedAfter?: string | undefined;
|
|
27
|
+
startedBefore?: string | undefined;
|
|
26
28
|
limit?: string | undefined;
|
|
27
29
|
offset?: string | undefined;
|
|
28
30
|
order?: "asc" | "desc" | undefined;
|
|
29
|
-
startedAfter?: string | undefined;
|
|
30
|
-
startedBefore?: string | undefined;
|
|
31
31
|
connectorId?: string | undefined;
|
|
32
32
|
idempotencyKey?: string | undefined;
|
|
33
33
|
webhookId?: string | undefined;
|
|
@@ -35,133 +35,133 @@ export declare const WebhookRunsQuerySchema: z.ZodObject<{
|
|
|
35
35
|
export declare const WebhookRunSchema: z.ZodObject<{
|
|
36
36
|
id: z.ZodString;
|
|
37
37
|
projectId: z.ZodString;
|
|
38
|
+
executionId: z.ZodString;
|
|
38
39
|
connectorId: z.ZodString;
|
|
39
40
|
webhookId: z.ZodString;
|
|
40
|
-
status: z.ZodEnum<["running", "succeeded", "failed"
|
|
41
|
+
status: z.ZodEnum<["running", "succeeded", "failed"]>;
|
|
41
42
|
method: z.ZodString;
|
|
42
43
|
route: z.ZodString;
|
|
43
44
|
startedAt: z.ZodString;
|
|
44
45
|
finishedAt: z.ZodOptional<z.ZodString>;
|
|
45
|
-
requestBodyBytes: z.
|
|
46
|
+
requestBodyBytes: z.ZodNumber;
|
|
46
47
|
responseStatus: z.ZodOptional<z.ZodNumber>;
|
|
47
48
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
48
|
-
|
|
49
|
-
error: z.ZodOptional<z.ZodString>;
|
|
49
|
+
error: z.ZodOptional<z.ZodType<SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected">, z.ZodTypeDef, SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected">>>;
|
|
50
50
|
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
52
51
|
projectId: string;
|
|
53
52
|
id: string;
|
|
53
|
+
status: "running" | "succeeded" | "failed";
|
|
54
54
|
startedAt: string;
|
|
55
55
|
method: string;
|
|
56
56
|
route: string;
|
|
57
57
|
connectorId: string;
|
|
58
|
+
executionId: string;
|
|
58
59
|
webhookId: string;
|
|
59
|
-
|
|
60
|
+
requestBodyBytes: number;
|
|
61
|
+
error?: SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
60
62
|
finishedAt?: string | undefined;
|
|
61
63
|
idempotencyKey?: string | undefined;
|
|
62
|
-
requestBodyBytes?: number | undefined;
|
|
63
64
|
responseStatus?: number | undefined;
|
|
64
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
65
65
|
}, {
|
|
66
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
67
66
|
projectId: string;
|
|
68
67
|
id: string;
|
|
68
|
+
status: "running" | "succeeded" | "failed";
|
|
69
69
|
startedAt: string;
|
|
70
70
|
method: string;
|
|
71
71
|
route: string;
|
|
72
72
|
connectorId: string;
|
|
73
|
+
executionId: string;
|
|
73
74
|
webhookId: string;
|
|
74
|
-
|
|
75
|
+
requestBodyBytes: number;
|
|
76
|
+
error?: SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
75
77
|
finishedAt?: string | undefined;
|
|
76
78
|
idempotencyKey?: string | undefined;
|
|
77
|
-
requestBodyBytes?: number | undefined;
|
|
78
79
|
responseStatus?: number | undefined;
|
|
79
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
export declare const WebhookRunListResponseSchema: z.ZodObject<{
|
|
82
82
|
runs: z.ZodArray<z.ZodObject<{
|
|
83
83
|
id: z.ZodString;
|
|
84
84
|
projectId: z.ZodString;
|
|
85
|
+
executionId: z.ZodString;
|
|
85
86
|
connectorId: z.ZodString;
|
|
86
87
|
webhookId: z.ZodString;
|
|
87
|
-
status: z.ZodEnum<["running", "succeeded", "failed"
|
|
88
|
+
status: z.ZodEnum<["running", "succeeded", "failed"]>;
|
|
88
89
|
method: z.ZodString;
|
|
89
90
|
route: z.ZodString;
|
|
90
91
|
startedAt: z.ZodString;
|
|
91
92
|
finishedAt: z.ZodOptional<z.ZodString>;
|
|
92
|
-
requestBodyBytes: z.
|
|
93
|
+
requestBodyBytes: z.ZodNumber;
|
|
93
94
|
responseStatus: z.ZodOptional<z.ZodNumber>;
|
|
94
95
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
95
|
-
|
|
96
|
-
error: z.ZodOptional<z.ZodString>;
|
|
96
|
+
error: z.ZodOptional<z.ZodType<SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected">, z.ZodTypeDef, SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected">>>;
|
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
99
98
|
projectId: string;
|
|
100
99
|
id: string;
|
|
100
|
+
status: "running" | "succeeded" | "failed";
|
|
101
101
|
startedAt: string;
|
|
102
102
|
method: string;
|
|
103
103
|
route: string;
|
|
104
104
|
connectorId: string;
|
|
105
|
+
executionId: string;
|
|
105
106
|
webhookId: string;
|
|
106
|
-
|
|
107
|
+
requestBodyBytes: number;
|
|
108
|
+
error?: SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
107
109
|
finishedAt?: string | undefined;
|
|
108
110
|
idempotencyKey?: string | undefined;
|
|
109
|
-
requestBodyBytes?: number | undefined;
|
|
110
111
|
responseStatus?: number | undefined;
|
|
111
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
112
112
|
}, {
|
|
113
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
114
113
|
projectId: string;
|
|
115
114
|
id: string;
|
|
115
|
+
status: "running" | "succeeded" | "failed";
|
|
116
116
|
startedAt: string;
|
|
117
117
|
method: string;
|
|
118
118
|
route: string;
|
|
119
119
|
connectorId: string;
|
|
120
|
+
executionId: string;
|
|
120
121
|
webhookId: string;
|
|
121
|
-
|
|
122
|
+
requestBodyBytes: number;
|
|
123
|
+
error?: SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
122
124
|
finishedAt?: string | undefined;
|
|
123
125
|
idempotencyKey?: string | undefined;
|
|
124
|
-
requestBodyBytes?: number | undefined;
|
|
125
126
|
responseStatus?: number | undefined;
|
|
126
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
127
127
|
}>, "many">;
|
|
128
128
|
hasMore: z.ZodBoolean;
|
|
129
129
|
total: z.ZodNumber;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
runs: {
|
|
132
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
133
132
|
projectId: string;
|
|
134
133
|
id: string;
|
|
134
|
+
status: "running" | "succeeded" | "failed";
|
|
135
135
|
startedAt: string;
|
|
136
136
|
method: string;
|
|
137
137
|
route: string;
|
|
138
138
|
connectorId: string;
|
|
139
|
+
executionId: string;
|
|
139
140
|
webhookId: string;
|
|
140
|
-
|
|
141
|
+
requestBodyBytes: number;
|
|
142
|
+
error?: SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
141
143
|
finishedAt?: string | undefined;
|
|
142
144
|
idempotencyKey?: string | undefined;
|
|
143
|
-
requestBodyBytes?: number | undefined;
|
|
144
145
|
responseStatus?: number | undefined;
|
|
145
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
146
146
|
}[];
|
|
147
147
|
hasMore: boolean;
|
|
148
148
|
total: number;
|
|
149
149
|
}, {
|
|
150
150
|
runs: {
|
|
151
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
152
151
|
projectId: string;
|
|
153
152
|
id: string;
|
|
153
|
+
status: "running" | "succeeded" | "failed";
|
|
154
154
|
startedAt: string;
|
|
155
155
|
method: string;
|
|
156
156
|
route: string;
|
|
157
157
|
connectorId: string;
|
|
158
|
+
executionId: string;
|
|
158
159
|
webhookId: string;
|
|
159
|
-
|
|
160
|
+
requestBodyBytes: number;
|
|
161
|
+
error?: SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
160
162
|
finishedAt?: string | undefined;
|
|
161
163
|
idempotencyKey?: string | undefined;
|
|
162
|
-
requestBodyBytes?: number | undefined;
|
|
163
164
|
responseStatus?: number | undefined;
|
|
164
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
165
165
|
}[];
|
|
166
166
|
hasMore: boolean;
|
|
167
167
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-runs.d.ts","sourceRoot":"","sources":["../../src/schemas/webhook-runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"webhook-runs.d.ts","sourceRoot":"","sources":["../../src/schemas/webhook-runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,sBAAsB,+CAA6C,CAAA;AAEhF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUjC,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAA"}
|