@vertesia/workflow 0.60.0 → 0.61.0
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/lib/cjs/activities/executeInteraction.js +7 -1
- package/lib/cjs/activities/executeInteraction.js.map +1 -1
- package/lib/cjs/activities/generateEmbeddings.js +23 -6
- package/lib/cjs/activities/generateEmbeddings.js.map +1 -1
- package/lib/cjs/activities/media/transcribeMediaWithGladia.js +1 -1
- package/lib/cjs/activities/media/transcribeMediaWithGladia.js.map +1 -1
- package/lib/cjs/errors.js +16 -2
- package/lib/cjs/errors.js.map +1 -1
- package/lib/esm/activities/executeInteraction.js +7 -1
- package/lib/esm/activities/executeInteraction.js.map +1 -1
- package/lib/esm/activities/generateEmbeddings.js +23 -6
- package/lib/esm/activities/generateEmbeddings.js.map +1 -1
- package/lib/esm/activities/media/transcribeMediaWithGladia.js +1 -1
- package/lib/esm/activities/media/transcribeMediaWithGladia.js.map +1 -1
- package/lib/esm/errors.js +14 -1
- package/lib/esm/errors.js.map +1 -1
- package/lib/types/activities/executeInteraction.d.ts.map +1 -1
- package/lib/types/activities/generateEmbeddings.d.ts.map +1 -1
- package/lib/types/errors.d.ts +5 -0
- package/lib/types/errors.d.ts.map +1 -1
- package/lib/workflows-bundle.js +291 -217
- package/package.json +5 -6
- package/src/activities/executeInteraction.ts +8 -1
- package/src/activities/generateEmbeddings.ts +440 -418
- package/src/activities/media/transcribeMediaWithGladia.ts +1 -1
- package/src/errors.ts +17 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DSLActivityExecutionPayload, DSLActivitySpec, GladiaConfiguration, SupportedIntegrations } from "@vertesia/common";
|
2
2
|
import { activityInfo, CompleteAsyncError, log } from "@temporalio/activity";
|
3
|
-
import { FetchClient } from "api-fetch-client";
|
3
|
+
import { FetchClient } from "@vertesia/api-fetch-client";
|
4
4
|
import { setupActivity } from "../../dsl/setup/ActivityContext.js";
|
5
5
|
import { NoDocumentFound } from "../../errors.js";
|
6
6
|
import { TextExtractionResult, TextExtractionStatus } from "../../index.js";
|
package/src/errors.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { ApplicationFailure } from "@temporalio/workflow";
|
1
2
|
import { DSLActivitySpec, DSLWorkflowSpec } from "@vertesia/common";
|
2
3
|
|
3
4
|
export class NoDocumentFound extends Error {
|
@@ -11,6 +12,16 @@ export class NoDocumentFound extends Error {
|
|
11
12
|
}
|
12
13
|
}
|
13
14
|
|
15
|
+
export class DocumentNotFoundError extends ApplicationFailure {
|
16
|
+
constructor(message: string, public ids?: string[]) {
|
17
|
+
super(
|
18
|
+
message,
|
19
|
+
"DocumentNotFoundError",
|
20
|
+
true, // non-retryable
|
21
|
+
)
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
14
25
|
export class ActivityParamNotFound extends Error {
|
15
26
|
constructor(
|
16
27
|
public paramName: string,
|
@@ -42,4 +53,9 @@ export class WorkflowParamNotFound extends Error {
|
|
42
53
|
}
|
43
54
|
}
|
44
55
|
|
45
|
-
export const WF_NON_RETRYABLE_ERRORS = [
|
56
|
+
export const WF_NON_RETRYABLE_ERRORS = [
|
57
|
+
"NoDocumentFound",
|
58
|
+
"DocumentNotFoundError",
|
59
|
+
"ActivityParamNotFound",
|
60
|
+
"WorkflowParamNotFound",
|
61
|
+
];
|