@vertesia/workflow 0.61.0 → 0.62.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/media/processPdfWithTextract.js +3 -2
- package/lib/cjs/activities/media/processPdfWithTextract.js.map +1 -1
- package/lib/cjs/utils/client.js +6 -3
- package/lib/cjs/utils/client.js.map +1 -1
- package/lib/esm/activities/media/processPdfWithTextract.js +3 -2
- package/lib/esm/activities/media/processPdfWithTextract.js.map +1 -1
- package/lib/esm/utils/client.js +5 -3
- package/lib/esm/utils/client.js.map +1 -1
- package/lib/types/utils/client.d.ts +5 -0
- package/lib/types/utils/client.d.ts.map +1 -1
- package/lib/workflows-bundle.js +558 -14
- package/package.json +4 -4
- package/src/activities/media/processPdfWithTextract.ts +3 -3
- package/src/utils/client.ts +5 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vertesia/workflow",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.62.0",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Composable prompts workflow dsl",
|
6
6
|
"main": "./lib/esm/index.js",
|
@@ -49,10 +49,10 @@
|
|
49
49
|
"tmp-promise": "^3.0.3",
|
50
50
|
"yaml": "^2.6.0",
|
51
51
|
"mime": "^4.0.0",
|
52
|
+
"@vertesia/common": "0.62.0",
|
53
|
+
"@vertesia/client": "0.62.0",
|
52
54
|
"@llumiverse/common": "0.18.0",
|
53
|
-
"@vertesia/client": "0.
|
54
|
-
"@vertesia/api-fetch-client": "0.61.0",
|
55
|
-
"@vertesia/common": "0.61.0"
|
55
|
+
"@vertesia/api-fetch-client": "0.62.0"
|
56
56
|
},
|
57
57
|
"ts_dual_module": {
|
58
58
|
"outDir": "lib",
|
@@ -58,9 +58,9 @@ export async function convertPdfToStructuredText(payload: DSLActivityExecutionPa
|
|
58
58
|
throw new NoDocumentFound(`Error fetching source ${object.content.source}`);
|
59
59
|
}
|
60
60
|
|
61
|
-
|
62
|
-
const awsConfig = (await client.projects.integrations.retrieve(
|
63
|
-
const credentials = await getS3AWSCredentials(awsConfig, payload.auth_token,
|
61
|
+
const project = await client.getProject();
|
62
|
+
const awsConfig = (await client.projects.integrations.retrieve(project!.id, SupportedIntegrations.aws)) as AwsConfiguration;
|
63
|
+
const credentials = await getS3AWSCredentials(awsConfig, payload.auth_token, project!.id);
|
64
64
|
|
65
65
|
const processor = new TextractProcessor({
|
66
66
|
fileKey: objectId,
|
package/src/utils/client.ts
CHANGED
@@ -8,7 +8,10 @@ import { WorkflowParamNotFound } from "../errors.js";
|
|
8
8
|
|
9
9
|
|
10
10
|
export function getVertesiaClient(payload: WorkflowExecutionBaseParams) {
|
11
|
+
return new VertesiaClient(getVertesiaClientOptions(payload));
|
12
|
+
}
|
11
13
|
|
14
|
+
export function getVertesiaClientOptions(payload: WorkflowExecutionBaseParams) {
|
12
15
|
if (!payload.auth_token) {
|
13
16
|
throw new WorkflowParamNotFound("Authentication Token is missing from WorkflowExecutionPayload.authToken");
|
14
17
|
}
|
@@ -21,12 +24,9 @@ export function getVertesiaClient(payload: WorkflowExecutionBaseParams) {
|
|
21
24
|
throw new WorkflowParamNotFound("Content Store URL is missing from WorkflowExecutionPayload.servers.storeUrl");
|
22
25
|
}
|
23
26
|
|
24
|
-
|
27
|
+
return {
|
25
28
|
serverUrl: payload.config.studio_url,
|
26
29
|
storeUrl: payload.config.store_url,
|
27
30
|
apikey: payload.auth_token
|
28
|
-
}
|
29
|
-
|
30
|
-
return client;
|
31
|
-
|
31
|
+
};
|
32
32
|
}
|