@krak-stack/registry 0.1.58 → 0.1.60

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 (41) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/README.md +3 -0
  3. package/dist/components/ui/data-table.d.ts +2 -0
  4. package/dist/components/ui/data-table.js +6 -2
  5. package/dist/components/ui/item.d.ts +22 -0
  6. package/dist/components/ui/trace.d.ts +18 -0
  7. package/dist/services/agent/client/index.js +584 -434
  8. package/dist/services/agent/client/widget.d.ts +1 -0
  9. package/dist/services/events/browser.js +29 -3
  10. package/dist/services/events/client/audit-log-table.js +6 -2
  11. package/dist/services/events/client/tracking-notice.js +2 -1
  12. package/dist/services/events/index.d.ts +26 -56
  13. package/dist/services/events/index.js +118 -7
  14. package/dist/services/events/schema.d.ts +66 -24
  15. package/dist/services/events/schema.js +34 -3
  16. package/dist/services/opentelemetry/api.js +2 -1
  17. package/dist/services/opentelemetry/browser.d.ts +1 -1
  18. package/dist/services/opentelemetry/browser.js +2 -1
  19. package/dist/services/opentelemetry/events.d.ts +1 -1
  20. package/dist/services/opentelemetry/index.d.ts +1 -1
  21. package/dist/services/opentelemetry/index.js +2 -1
  22. package/dist/services/opentelemetry/schema.d.ts +3 -1
  23. package/dist/services/opentelemetry/web-vitals.js +2 -1
  24. package/dist/services/speech/api.d.ts +13 -0
  25. package/dist/services/speech/api.js +60 -0
  26. package/dist/services/speech/index.d.ts +39 -0
  27. package/dist/services/speech/index.js +105 -0
  28. package/dist/services/speech/schema.d.ts +43 -0
  29. package/dist/services/speech/schema.js +54 -0
  30. package/dist/services/webhooks/http-client.d.ts +7 -0
  31. package/dist/services/webhooks/http-client.js +57 -0
  32. package/dist/services/webhooks/index.d.ts +341 -0
  33. package/dist/services/webhooks/index.js +737 -0
  34. package/dist/services/webhooks/migrations.d.ts +5 -0
  35. package/dist/services/webhooks/migrations.js +44 -0
  36. package/dist/services/webhooks/schema.d.ts +243 -0
  37. package/dist/services/webhooks/schema.js +333 -0
  38. package/dist/services/webhooks/url.d.ts +3 -0
  39. package/dist/services/webhooks/url.js +32 -0
  40. package/package.json +37 -1
  41. package/dist/components/ui/marker.d.ts +0 -10
@@ -0,0 +1,341 @@
1
+ import { Cause, Context, Effect, Layer, Schema } from "effect";
2
+ import { HttpClient } from "effect/http";
3
+ import { Workflow } from "effect/workflow";
4
+ import { SqlClient } from "effect/sql";
5
+ import { WebhookError, WebhookPayload } from "./schema.js";
6
+ export * from "./schema.js";
7
+ export declare const DeliverWebhookV1: Workflow.Workflow<"KrakstackDeliverWebhookV1", Schema.Struct<{
8
+ organizationId: Schema.String;
9
+ id: Schema.String;
10
+ }>, Schema.Void, typeof WebhookError>;
11
+ declare const Webhooks_base: Context.ServiceClass<Webhooks, "krakstack/webhooks/Webhooks", {
12
+ list: (request: {
13
+ readonly organizationId: string;
14
+ }) => Effect.Effect<{
15
+ readonly id: string;
16
+ readonly name: string;
17
+ readonly organizationId: string;
18
+ readonly url: string;
19
+ readonly description: string | null;
20
+ readonly headers: {
21
+ readonly [x: string]: string;
22
+ } | null;
23
+ readonly events: readonly string[] | null;
24
+ readonly secret: string;
25
+ readonly enabled: boolean;
26
+ readonly createdAt: Date;
27
+ readonly updatedAt: Date;
28
+ }[], Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
29
+ get: (input: {
30
+ readonly organizationId: string;
31
+ readonly id: string;
32
+ }) => Effect.Effect<{
33
+ id: string;
34
+ name: string;
35
+ organizationId: string;
36
+ url: string;
37
+ description: string | null;
38
+ headers: {
39
+ readonly [x: string]: string;
40
+ } | null;
41
+ events: readonly string[] | null;
42
+ secret: string;
43
+ enabled: boolean;
44
+ createdAt: Date;
45
+ updatedAt: Date;
46
+ deliveries: {
47
+ readonly id: string;
48
+ readonly webhookId: string;
49
+ readonly event: string;
50
+ readonly data: Schema.Json;
51
+ readonly status: "failed" | "pending" | "success";
52
+ readonly error: string | null;
53
+ readonly completedAt: Date | null;
54
+ readonly retryAt: Date;
55
+ readonly retries: number;
56
+ readonly createdAt: Date;
57
+ readonly updatedAt: Date;
58
+ }[];
59
+ } | undefined, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
60
+ listDeliveries: (input: {
61
+ readonly page?: string | number | undefined;
62
+ readonly pageSize?: string | number | undefined;
63
+ readonly globalFilter?: string | undefined;
64
+ readonly organizationId: string;
65
+ readonly id: string;
66
+ readonly filters?: readonly ({
67
+ readonly id: string;
68
+ readonly kind: "number";
69
+ readonly min?: number | undefined;
70
+ readonly max?: number | undefined;
71
+ } | {
72
+ readonly id: string;
73
+ readonly kind: "date";
74
+ readonly from?: string | undefined;
75
+ readonly to?: string | undefined;
76
+ } | {
77
+ readonly id: string;
78
+ readonly kind: "text";
79
+ readonly operator: "contains" | "endsWith" | "equals" | "startsWith";
80
+ readonly value: string;
81
+ } | {
82
+ readonly id: string;
83
+ readonly kind: "boolean";
84
+ readonly value: boolean;
85
+ } | {
86
+ readonly id: string;
87
+ readonly kind: "values";
88
+ readonly values: readonly [string, ...string[]];
89
+ })[] | undefined;
90
+ readonly sort?: readonly {
91
+ readonly id: string;
92
+ readonly direction: "asc" | "desc";
93
+ }[] | undefined;
94
+ }) => Effect.Effect<{
95
+ data: {
96
+ readonly id: string;
97
+ readonly webhookId: string;
98
+ readonly event: string;
99
+ readonly data: Schema.Json;
100
+ readonly status: "failed" | "pending" | "success";
101
+ readonly error: string | null;
102
+ readonly completedAt: Date | null;
103
+ readonly retryAt: Date;
104
+ readonly retries: number;
105
+ readonly createdAt: Date;
106
+ readonly updatedAt: Date;
107
+ }[];
108
+ meta: {
109
+ page: number;
110
+ pageSize: number;
111
+ total: number;
112
+ pageCount: number;
113
+ };
114
+ } | undefined, Cause.NoSuchElementError | Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
115
+ statistics: (input: {
116
+ readonly organizationId: string;
117
+ readonly id: string;
118
+ readonly interval: "day" | "hour";
119
+ }) => Effect.Effect<{
120
+ total: number;
121
+ success: number;
122
+ failed: number;
123
+ buckets: {
124
+ readonly total: number;
125
+ readonly success: number;
126
+ readonly failed: number;
127
+ readonly bucket: Date;
128
+ readonly events: readonly {
129
+ readonly event: string;
130
+ readonly total: number;
131
+ }[];
132
+ }[];
133
+ } | undefined, Cause.NoSuchElementError | Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
134
+ create: (input: {
135
+ organizationId: string;
136
+ payload: WebhookPayload;
137
+ }) => Effect.Effect<{
138
+ id: string;
139
+ }, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
140
+ update: (input: {
141
+ readonly organizationId: string;
142
+ readonly id: string;
143
+ } & {
144
+ payload: WebhookPayload;
145
+ }) => Effect.Effect<{
146
+ readonly id: string;
147
+ readonly name: string;
148
+ readonly organizationId: string;
149
+ readonly url: string;
150
+ readonly description: string | null;
151
+ readonly headers: {
152
+ readonly [x: string]: string;
153
+ } | null;
154
+ readonly events: readonly string[] | null;
155
+ readonly secret: string;
156
+ readonly enabled: boolean;
157
+ readonly createdAt: Date;
158
+ readonly updatedAt: Date;
159
+ } | null, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
160
+ delete: (input: {
161
+ readonly organizationId: string;
162
+ readonly id: string;
163
+ }) => Effect.Effect<{
164
+ success: boolean;
165
+ } | null, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
166
+ publish: (input: {
167
+ readonly organizationId: string;
168
+ readonly eventId: string;
169
+ readonly event: string;
170
+ readonly data: Schema.Json;
171
+ }) => Effect.Effect<undefined, Schema.SchemaError | import("effect/sql/SqlError").SqlError | WebhookError, never>;
172
+ cleanup: () => Effect.Effect<void, import("effect/sql/SqlError").SqlError, never>;
173
+ }> & {
174
+ readonly make: Effect.Effect<{
175
+ list: (request: {
176
+ readonly organizationId: string;
177
+ }) => Effect.Effect<{
178
+ readonly id: string;
179
+ readonly name: string;
180
+ readonly organizationId: string;
181
+ readonly url: string;
182
+ readonly description: string | null;
183
+ readonly headers: {
184
+ readonly [x: string]: string;
185
+ } | null;
186
+ readonly events: readonly string[] | null;
187
+ readonly secret: string;
188
+ readonly enabled: boolean;
189
+ readonly createdAt: Date;
190
+ readonly updatedAt: Date;
191
+ }[], Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
192
+ get: (input: {
193
+ readonly organizationId: string;
194
+ readonly id: string;
195
+ }) => Effect.Effect<{
196
+ id: string;
197
+ name: string;
198
+ organizationId: string;
199
+ url: string;
200
+ description: string | null;
201
+ headers: {
202
+ readonly [x: string]: string;
203
+ } | null;
204
+ events: readonly string[] | null;
205
+ secret: string;
206
+ enabled: boolean;
207
+ createdAt: Date;
208
+ updatedAt: Date;
209
+ deliveries: {
210
+ readonly id: string;
211
+ readonly webhookId: string;
212
+ readonly event: string;
213
+ readonly data: Schema.Json;
214
+ readonly status: "failed" | "pending" | "success";
215
+ readonly error: string | null;
216
+ readonly completedAt: Date | null;
217
+ readonly retryAt: Date;
218
+ readonly retries: number;
219
+ readonly createdAt: Date;
220
+ readonly updatedAt: Date;
221
+ }[];
222
+ } | undefined, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
223
+ listDeliveries: (input: {
224
+ readonly page?: string | number | undefined;
225
+ readonly pageSize?: string | number | undefined;
226
+ readonly globalFilter?: string | undefined;
227
+ readonly organizationId: string;
228
+ readonly id: string;
229
+ readonly filters?: readonly ({
230
+ readonly id: string;
231
+ readonly kind: "number";
232
+ readonly min?: number | undefined;
233
+ readonly max?: number | undefined;
234
+ } | {
235
+ readonly id: string;
236
+ readonly kind: "date";
237
+ readonly from?: string | undefined;
238
+ readonly to?: string | undefined;
239
+ } | {
240
+ readonly id: string;
241
+ readonly kind: "text";
242
+ readonly operator: "contains" | "endsWith" | "equals" | "startsWith";
243
+ readonly value: string;
244
+ } | {
245
+ readonly id: string;
246
+ readonly kind: "boolean";
247
+ readonly value: boolean;
248
+ } | {
249
+ readonly id: string;
250
+ readonly kind: "values";
251
+ readonly values: readonly [string, ...string[]];
252
+ })[] | undefined;
253
+ readonly sort?: readonly {
254
+ readonly id: string;
255
+ readonly direction: "asc" | "desc";
256
+ }[] | undefined;
257
+ }) => Effect.Effect<{
258
+ data: {
259
+ readonly id: string;
260
+ readonly webhookId: string;
261
+ readonly event: string;
262
+ readonly data: Schema.Json;
263
+ readonly status: "failed" | "pending" | "success";
264
+ readonly error: string | null;
265
+ readonly completedAt: Date | null;
266
+ readonly retryAt: Date;
267
+ readonly retries: number;
268
+ readonly createdAt: Date;
269
+ readonly updatedAt: Date;
270
+ }[];
271
+ meta: {
272
+ page: number;
273
+ pageSize: number;
274
+ total: number;
275
+ pageCount: number;
276
+ };
277
+ } | undefined, Cause.NoSuchElementError | Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
278
+ statistics: (input: {
279
+ readonly organizationId: string;
280
+ readonly id: string;
281
+ readonly interval: "day" | "hour";
282
+ }) => Effect.Effect<{
283
+ total: number;
284
+ success: number;
285
+ failed: number;
286
+ buckets: {
287
+ readonly total: number;
288
+ readonly success: number;
289
+ readonly failed: number;
290
+ readonly bucket: Date;
291
+ readonly events: readonly {
292
+ readonly event: string;
293
+ readonly total: number;
294
+ }[];
295
+ }[];
296
+ } | undefined, Cause.NoSuchElementError | Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
297
+ create: (input: {
298
+ organizationId: string;
299
+ payload: WebhookPayload;
300
+ }) => Effect.Effect<{
301
+ id: string;
302
+ }, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
303
+ update: (input: {
304
+ readonly organizationId: string;
305
+ readonly id: string;
306
+ } & {
307
+ payload: WebhookPayload;
308
+ }) => Effect.Effect<{
309
+ readonly id: string;
310
+ readonly name: string;
311
+ readonly organizationId: string;
312
+ readonly url: string;
313
+ readonly description: string | null;
314
+ readonly headers: {
315
+ readonly [x: string]: string;
316
+ } | null;
317
+ readonly events: readonly string[] | null;
318
+ readonly secret: string;
319
+ readonly enabled: boolean;
320
+ readonly createdAt: Date;
321
+ readonly updatedAt: Date;
322
+ } | null, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
323
+ delete: (input: {
324
+ readonly organizationId: string;
325
+ readonly id: string;
326
+ }) => Effect.Effect<{
327
+ success: boolean;
328
+ } | null, Schema.SchemaError | import("effect/sql/SqlError").SqlError, never>;
329
+ publish: (input: {
330
+ readonly organizationId: string;
331
+ readonly eventId: string;
332
+ readonly event: string;
333
+ readonly data: Schema.Json;
334
+ }) => Effect.Effect<undefined, Schema.SchemaError | import("effect/sql/SqlError").SqlError | WebhookError, never>;
335
+ cleanup: () => Effect.Effect<void, import("effect/sql/SqlError").SqlError, never>;
336
+ }, never, SqlClient.SqlClient>;
337
+ };
338
+ export declare class Webhooks extends Webhooks_base {
339
+ static readonly layerWithoutMigrations: Layer.Layer<Webhooks, never, HttpClient.HttpClient | SqlClient.SqlClient | import("effect/workflow/WorkflowEngine").WorkflowEngine>;
340
+ static readonly layer: Layer.Layer<Webhooks, import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, import("effect/net/Dns").Dns | SqlClient.SqlClient | import("effect/workflow/WorkflowEngine").WorkflowEngine>;
341
+ }