@vertesia/workflow 0.78.0 → 0.79.1
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/advanced/createDocumentTypeFromInteractionRun.js +8 -7
- package/lib/cjs/activities/advanced/createDocumentTypeFromInteractionRun.js.map +1 -1
- package/lib/cjs/activities/advanced/createOrUpdateDocumentFromInteractionRun.js +10 -9
- package/lib/cjs/activities/advanced/createOrUpdateDocumentFromInteractionRun.js.map +1 -1
- package/lib/cjs/activities/advanced/updateDocumentFromInteractionRun.js +2 -1
- package/lib/cjs/activities/advanced/updateDocumentFromInteractionRun.js.map +1 -1
- package/lib/cjs/activities/chunkDocument.js +2 -1
- package/lib/cjs/activities/chunkDocument.js.map +1 -1
- package/lib/cjs/activities/executeInteraction.js +11 -7
- package/lib/cjs/activities/executeInteraction.js.map +1 -1
- package/lib/cjs/activities/generateDocumentProperties.js +11 -6
- package/lib/cjs/activities/generateDocumentProperties.js.map +1 -1
- package/lib/cjs/activities/generateOrAssignContentType.js +12 -10
- package/lib/cjs/activities/generateOrAssignContentType.js.map +1 -1
- package/lib/cjs/activities/index-dsl.js +5 -3
- package/lib/cjs/activities/index-dsl.js.map +1 -1
- package/lib/cjs/activities/media/prepareVideo.js +429 -0
- package/lib/cjs/activities/media/prepareVideo.js.map +1 -0
- package/lib/cjs/activities/media/transcribeMediaWithGladia.js +48 -15
- package/lib/cjs/activities/media/transcribeMediaWithGladia.js.map +1 -1
- package/lib/cjs/activities/notifyWebhook.js +137 -12
- package/lib/cjs/activities/notifyWebhook.js.map +1 -1
- package/lib/cjs/activities/rateLimiter.js +30 -0
- package/lib/cjs/activities/rateLimiter.js.map +1 -0
- package/lib/cjs/conversion/image.js +4 -2
- package/lib/cjs/conversion/image.js.map +1 -1
- package/lib/cjs/dsl/dsl-workflow.js +66 -0
- package/lib/cjs/dsl/dsl-workflow.js.map +1 -1
- package/lib/cjs/dsl/setup/ActivityContext.js +7 -4
- package/lib/cjs/dsl/setup/ActivityContext.js.map +1 -1
- package/lib/cjs/errors.js +22 -1
- package/lib/cjs/errors.js.map +1 -1
- package/lib/cjs/index.js +2 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/iterative-generation/activities/extractToc.js +2 -2
- package/lib/cjs/iterative-generation/activities/extractToc.js.map +1 -1
- package/lib/cjs/iterative-generation/activities/finalizeOutput.js +7 -4
- package/lib/cjs/iterative-generation/activities/finalizeOutput.js.map +1 -1
- package/lib/cjs/iterative-generation/activities/generatePart.js +18 -13
- package/lib/cjs/iterative-generation/activities/generatePart.js.map +1 -1
- package/lib/cjs/iterative-generation/activities/generateToc.js +50 -55
- package/lib/cjs/iterative-generation/activities/generateToc.js.map +1 -1
- package/lib/cjs/iterative-generation/utils.js.map +1 -1
- package/lib/cjs/system/notifyWebhookWorkflow.js +10 -3
- package/lib/cjs/system/notifyWebhookWorkflow.js.map +1 -1
- package/lib/cjs/utils/blobs.js +4 -1
- package/lib/cjs/utils/blobs.js.map +1 -1
- package/lib/cjs/utils/client.js +3 -1
- package/lib/cjs/utils/client.js.map +1 -1
- package/lib/esm/activities/advanced/createDocumentTypeFromInteractionRun.js +8 -7
- package/lib/esm/activities/advanced/createDocumentTypeFromInteractionRun.js.map +1 -1
- package/lib/esm/activities/advanced/createOrUpdateDocumentFromInteractionRun.js +10 -9
- package/lib/esm/activities/advanced/createOrUpdateDocumentFromInteractionRun.js.map +1 -1
- package/lib/esm/activities/advanced/updateDocumentFromInteractionRun.js +2 -1
- package/lib/esm/activities/advanced/updateDocumentFromInteractionRun.js.map +1 -1
- package/lib/esm/activities/chunkDocument.js +2 -1
- package/lib/esm/activities/chunkDocument.js.map +1 -1
- package/lib/esm/activities/executeInteraction.js +12 -8
- package/lib/esm/activities/executeInteraction.js.map +1 -1
- package/lib/esm/activities/generateDocumentProperties.js +11 -6
- package/lib/esm/activities/generateDocumentProperties.js.map +1 -1
- package/lib/esm/activities/generateOrAssignContentType.js +12 -10
- package/lib/esm/activities/generateOrAssignContentType.js.map +1 -1
- package/lib/esm/activities/index-dsl.js +2 -1
- package/lib/esm/activities/index-dsl.js.map +1 -1
- package/lib/esm/activities/media/prepareVideo.js +390 -0
- package/lib/esm/activities/media/prepareVideo.js.map +1 -0
- package/lib/esm/activities/media/transcribeMediaWithGladia.js +50 -17
- package/lib/esm/activities/media/transcribeMediaWithGladia.js.map +1 -1
- package/lib/esm/activities/notifyWebhook.js +137 -12
- package/lib/esm/activities/notifyWebhook.js.map +1 -1
- package/lib/esm/activities/rateLimiter.js +27 -0
- package/lib/esm/activities/rateLimiter.js.map +1 -0
- package/lib/esm/conversion/image.js +4 -2
- package/lib/esm/conversion/image.js.map +1 -1
- package/lib/esm/dsl/dsl-workflow.js +68 -2
- package/lib/esm/dsl/dsl-workflow.js.map +1 -1
- package/lib/esm/dsl/setup/ActivityContext.js +10 -7
- package/lib/esm/dsl/setup/ActivityContext.js.map +1 -1
- package/lib/esm/errors.js +19 -0
- package/lib/esm/errors.js.map +1 -1
- package/lib/esm/index.js +2 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/iterative-generation/activities/extractToc.js +3 -3
- package/lib/esm/iterative-generation/activities/extractToc.js.map +1 -1
- package/lib/esm/iterative-generation/activities/finalizeOutput.js +9 -6
- package/lib/esm/iterative-generation/activities/finalizeOutput.js.map +1 -1
- package/lib/esm/iterative-generation/activities/generatePart.js +19 -14
- package/lib/esm/iterative-generation/activities/generatePart.js.map +1 -1
- package/lib/esm/iterative-generation/activities/generateToc.js +50 -55
- package/lib/esm/iterative-generation/activities/generateToc.js.map +1 -1
- package/lib/esm/iterative-generation/utils.js.map +1 -1
- package/lib/esm/system/notifyWebhookWorkflow.js +11 -4
- package/lib/esm/system/notifyWebhookWorkflow.js.map +1 -1
- package/lib/esm/utils/blobs.js +4 -1
- package/lib/esm/utils/blobs.js.map +1 -1
- package/lib/esm/utils/client.js +4 -2
- package/lib/esm/utils/client.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/activities/advanced/createDocumentTypeFromInteractionRun.d.ts.map +1 -1
- package/lib/types/activities/advanced/createOrUpdateDocumentFromInteractionRun.d.ts +1 -1
- package/lib/types/activities/advanced/createOrUpdateDocumentFromInteractionRun.d.ts.map +1 -1
- package/lib/types/activities/advanced/updateDocumentFromInteractionRun.d.ts.map +1 -1
- package/lib/types/activities/chunkDocument.d.ts.map +1 -1
- package/lib/types/activities/executeInteraction.d.ts +5 -1
- package/lib/types/activities/executeInteraction.d.ts.map +1 -1
- package/lib/types/activities/generateDocumentProperties.d.ts.map +1 -1
- package/lib/types/activities/generateOrAssignContentType.d.ts.map +1 -1
- package/lib/types/activities/index-dsl.d.ts +2 -1
- package/lib/types/activities/index-dsl.d.ts.map +1 -1
- package/lib/types/activities/media/prepareVideo.d.ts +30 -0
- package/lib/types/activities/media/prepareVideo.d.ts.map +1 -0
- package/lib/types/activities/media/transcribeMediaWithGladia.d.ts.map +1 -1
- package/lib/types/activities/notifyWebhook.d.ts +14 -3
- package/lib/types/activities/notifyWebhook.d.ts.map +1 -1
- package/lib/types/activities/rateLimiter.d.ts +11 -0
- package/lib/types/activities/rateLimiter.d.ts.map +1 -0
- package/lib/types/conversion/image.d.ts.map +1 -1
- package/lib/types/dsl/dsl-workflow.d.ts.map +1 -1
- package/lib/types/dsl/setup/ActivityContext.d.ts.map +1 -1
- package/lib/types/errors.d.ts +10 -0
- package/lib/types/errors.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/iterative-generation/activities/extractToc.d.ts.map +1 -1
- package/lib/types/iterative-generation/activities/finalizeOutput.d.ts.map +1 -1
- package/lib/types/iterative-generation/activities/generatePart.d.ts.map +1 -1
- package/lib/types/iterative-generation/activities/generateToc.d.ts.map +1 -1
- package/lib/types/iterative-generation/utils.d.ts +3 -4
- package/lib/types/iterative-generation/utils.d.ts.map +1 -1
- package/lib/types/system/notifyWebhookWorkflow.d.ts +3 -2
- package/lib/types/system/notifyWebhookWorkflow.d.ts.map +1 -1
- package/lib/types/utils/blobs.d.ts.map +1 -1
- package/lib/types/utils/client.d.ts +2 -6
- package/lib/types/utils/client.d.ts.map +1 -1
- package/lib/workflows-bundle.js +8413 -5201
- package/package.json +128 -120
- package/src/activities/advanced/createDocumentTypeFromInteractionRun.ts +9 -8
- package/src/activities/advanced/createOrUpdateDocumentFromInteractionRun.ts +11 -9
- package/src/activities/advanced/updateDocumentFromInteractionRun.ts +2 -1
- package/src/activities/chunkDocument.ts +3 -1
- package/src/activities/executeInteraction.ts +23 -14
- package/src/activities/generateDocumentProperties.ts +12 -7
- package/src/activities/generateOrAssignContentType.ts +16 -11
- package/src/activities/index-dsl.ts +2 -1
- package/src/activities/media/prepareVideo.ts +622 -0
- package/src/activities/media/transcribeMediaWithGladia.ts +52 -21
- package/src/activities/notifyWebhook.test.ts +121 -19
- package/src/activities/notifyWebhook.ts +165 -16
- package/src/activities/rateLimiter.ts +41 -0
- package/src/conversion/image.ts +6 -3
- package/src/dsl/dsl-workflow.ts +86 -0
- package/src/dsl/workflow-exec-child.test.ts +1 -0
- package/src/dsl/workflow.test.ts +1 -0
- package/src/errors.ts +28 -0
- package/src/index.ts +2 -1
- package/src/iterative-generation/activities/generatePart.ts +1 -1
- package/src/iterative-generation/activities/generateToc.ts +7 -2
- package/src/iterative-generation/utils.ts +4 -5
- package/src/system/notifyWebhookWorkflow.ts +15 -6
- package/lib/cjs/activities/identifyTextSections.js +0 -48
- package/lib/cjs/activities/identifyTextSections.js.map +0 -1
- package/lib/esm/activities/identifyTextSections.js +0 -45
- package/lib/esm/activities/identifyTextSections.js.map +0 -1
- package/lib/types/activities/identifyTextSections.d.ts +0 -12
- package/lib/types/activities/identifyTextSections.d.ts.map +0 -1
- package/src/activities/identifyTextSections.ts +0 -71
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DSLActivityExecutionPayload, DSLActivitySpec, GladiaConfiguration, SupportedIntegrations } from "@vertesia/common";
|
|
1
|
+
import { DSLActivityExecutionPayload, DSLActivitySpec, GladiaConfiguration, SupportedIntegrations, AUDIO_RENDITION_NAME, VideoMetadata, ContentNature } from "@vertesia/common";
|
|
2
2
|
import { activityInfo, CompleteAsyncError, log } from "@temporalio/activity";
|
|
3
|
-
import { FetchClient } from "@vertesia/api-fetch-client";
|
|
3
|
+
import { FetchClient, RequestError } from "@vertesia/api-fetch-client";
|
|
4
4
|
import { setupActivity } from "../../dsl/setup/ActivityContext.js";
|
|
5
5
|
import { DocumentNotFoundError } from "../../errors.js";
|
|
6
6
|
import { TextExtractionResult, TextExtractionStatus } from "../../index.js";
|
|
@@ -27,7 +27,12 @@ export async function transcribeMedia(payload: DSLActivityExecutionPayload<Trans
|
|
|
27
27
|
|
|
28
28
|
const gladiaConfig = await client.projects.integrations.retrieve(payload.project_id, SupportedIntegrations.gladia) as GladiaConfiguration | undefined;
|
|
29
29
|
if (!gladiaConfig || !gladiaConfig.enabled) {
|
|
30
|
-
|
|
30
|
+
return {
|
|
31
|
+
hasText: false,
|
|
32
|
+
objectId,
|
|
33
|
+
status: TextExtractionStatus.error,
|
|
34
|
+
error: "Gladia integration not enabled",
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
const object = await client.objects.retrieve(objectId, "+text");
|
|
@@ -42,37 +47,63 @@ export async function transcribeMedia(payload: DSLActivityExecutionPayload<Trans
|
|
|
42
47
|
throw new DocumentNotFoundError(`No source found for object ${objectId}`);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
// Check for audio rendition in video metadata (preferred for videos)
|
|
51
|
+
let mediaSource: string = object.content.source;
|
|
52
|
+
if (object.metadata?.type === ContentNature.Video) {
|
|
53
|
+
const videoMetadata = object.metadata as VideoMetadata;
|
|
54
|
+
const audioRendition = videoMetadata.renditions?.find(r => r.name === AUDIO_RENDITION_NAME);
|
|
55
|
+
if (audioRendition?.content?.source) {
|
|
56
|
+
mediaSource = audioRendition.content.source;
|
|
57
|
+
log.info(`Found audio rendition for video object ${objectId}`, { mediaSource });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Get download URL for the media source
|
|
62
|
+
const { url: mediaUrl } = await client.files.getDownloadUrl(mediaSource);
|
|
46
63
|
|
|
47
64
|
if (!mediaUrl) {
|
|
48
|
-
throw new DocumentNotFoundError(`Error fetching
|
|
65
|
+
throw new DocumentNotFoundError(`Error fetching media URL for ${mediaSource}`);
|
|
49
66
|
}
|
|
50
67
|
|
|
68
|
+
log.info(`Using media URL for transcription`, { objectId, mediaUrl: mediaSource });
|
|
69
|
+
|
|
51
70
|
const taskToken = Buffer.from(activityInfo().taskToken).toString('base64url');
|
|
52
71
|
const callbackUrl = generateCallbackUrlForGladia(client.store.baseUrl, payload.auth_token, taskToken, objectId);
|
|
53
72
|
|
|
54
73
|
log.info(`Transcribing media ${mediaUrl} with Gladia`, { objectId, callbackUrl });
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
try {
|
|
76
|
+
const res = await gladiaClient.post("/transcription", {
|
|
77
|
+
payload: {
|
|
78
|
+
audio_url: mediaUrl,
|
|
79
|
+
callback_url: callbackUrl,
|
|
80
|
+
diarization_enhanced: true,
|
|
81
|
+
enable_code_switching: true,
|
|
82
|
+
subtitles: true,
|
|
83
|
+
subtitles_config: {
|
|
84
|
+
formats: ["vtt"],
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}) as GladiaTranscriptRequestResponse;
|
|
88
|
+
|
|
89
|
+
log.info(`Transcription request sent to Gladia`, { objectId, res });
|
|
90
|
+
throw new CompleteAsyncError();
|
|
91
|
+
|
|
92
|
+
} catch (error: any) {
|
|
93
|
+
if (error instanceof RequestError && error.status === 422) {
|
|
94
|
+
return {
|
|
95
|
+
hasText: false,
|
|
96
|
+
objectId,
|
|
97
|
+
status: TextExtractionStatus.error,
|
|
98
|
+
error: `Gladia transcription error: ${error.message}`,
|
|
65
99
|
}
|
|
100
|
+
} else {
|
|
101
|
+
log.error(`Error sending transcription request to Gladia for object ${objectId}`, { error });
|
|
102
|
+
throw error;
|
|
66
103
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
log.info(`Transcription request sent to Gladia`, { objectId, res });
|
|
70
|
-
|
|
71
|
-
throw new CompleteAsyncError();
|
|
72
|
-
|
|
104
|
+
}
|
|
73
105
|
}
|
|
74
106
|
|
|
75
|
-
|
|
76
107
|
function generateCallbackUrlForGladia(baseUrl: string, authToken: string, taskToken: string, objectId: string) {
|
|
77
108
|
return `${baseUrl}/api/v1/webhooks/gladia/${objectId}?access_token=${authToken}&task_token=${taskToken}`;
|
|
78
109
|
}
|
|
@@ -1,32 +1,134 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MockActivityEnvironment,
|
|
3
|
-
TestWorkflowEnvironment,
|
|
4
3
|
} from "@temporalio/testing";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { ContentEventName, DSLActivityExecutionPayload } from "@vertesia/common";
|
|
5
|
+
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { notifyWebhook, NotifyWebhookParams } from "./notifyWebhook.js";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
// Mock fetch globally
|
|
9
|
+
vi.stubGlobal('fetch', vi.fn());
|
|
10
|
+
|
|
11
|
+
let testEnv: MockActivityEnvironment;
|
|
12
|
+
const mockFetch = vi.mocked(fetch);
|
|
10
13
|
|
|
11
14
|
beforeAll(async () => {
|
|
12
|
-
testEnv =
|
|
13
|
-
|
|
15
|
+
testEnv = new MockActivityEnvironment();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
vi.clearAllMocks();
|
|
14
20
|
});
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
const defaultParams = {
|
|
23
|
+
webhook: "https://vertesia.test",
|
|
24
|
+
method: "POST" as const,
|
|
25
|
+
detail: { message: "Hello World" },
|
|
26
|
+
workflow_id: "wf_id",
|
|
27
|
+
workflow_type: "wfFuncName",
|
|
28
|
+
workflow_run_id: "wf_run_id",
|
|
29
|
+
event_name: "completed",
|
|
30
|
+
} satisfies NotifyWebhookParams;
|
|
31
|
+
|
|
32
|
+
// Helper function to create test payload
|
|
33
|
+
const createTestPayload = (params: Partial<NotifyWebhookParams> = {}): DSLActivityExecutionPayload<NotifyWebhookParams> => {
|
|
34
|
+
const mergedParams = { ...defaultParams, ...params };
|
|
35
|
+
return {
|
|
36
|
+
auth_token: "unset",
|
|
37
|
+
account_id: "unset",
|
|
38
|
+
project_id: "unset",
|
|
39
|
+
params: mergedParams,
|
|
40
|
+
config: {
|
|
41
|
+
studio_url: "http://mock-studio",
|
|
42
|
+
store_url: "http://mock-store",
|
|
43
|
+
},
|
|
44
|
+
workflow_name: "",
|
|
45
|
+
event: ContentEventName.create,
|
|
46
|
+
objectIds: [],
|
|
47
|
+
vars: {},
|
|
48
|
+
activity: { name: "notifyWebhook", params: mergedParams }
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
18
52
|
describe("Webhook should be notified", () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
53
|
+
it("test POST success", async () => {
|
|
54
|
+
// Mock successful response
|
|
55
|
+
const mockResponse = {
|
|
56
|
+
ok: true,
|
|
57
|
+
status: 200,
|
|
58
|
+
statusText: 'OK',
|
|
59
|
+
url: defaultParams.webhook
|
|
60
|
+
};
|
|
61
|
+
mockFetch.mockResolvedValueOnce(mockResponse as Response);
|
|
62
|
+
|
|
63
|
+
const payload = createTestPayload();
|
|
64
|
+
const res = await testEnv.run(notifyWebhook, payload);
|
|
65
|
+
|
|
66
|
+
// Verify fetch was called with correct parameters
|
|
67
|
+
expect(mockFetch).toHaveBeenCalledWith(defaultParams.webhook, {
|
|
68
|
+
method: 'POST',
|
|
69
|
+
body: JSON.stringify({ message: 'Hello World' }),
|
|
70
|
+
headers: {
|
|
71
|
+
'Content-Type': 'application/json',
|
|
26
72
|
},
|
|
27
|
-
}
|
|
73
|
+
});
|
|
28
74
|
|
|
29
|
-
|
|
30
|
-
expect(res).
|
|
75
|
+
// Verify response
|
|
76
|
+
expect(res).toEqual({
|
|
77
|
+
status: 200,
|
|
78
|
+
message: 'OK',
|
|
79
|
+
url: defaultParams.webhook
|
|
80
|
+
});
|
|
31
81
|
});
|
|
82
|
+
|
|
83
|
+
it("test POST server error", async () => {
|
|
84
|
+
// Mock error response with response body
|
|
85
|
+
const mockResponse = {
|
|
86
|
+
ok: false,
|
|
87
|
+
status: 500,
|
|
88
|
+
statusText: 'Internal Server Error',
|
|
89
|
+
url: defaultParams.webhook,
|
|
90
|
+
text: vi.fn().mockResolvedValue('{"error": "Database connection failed", "code": "DB_ERROR"}')
|
|
91
|
+
} as unknown as Response;
|
|
92
|
+
mockFetch.mockResolvedValueOnce(mockResponse);
|
|
93
|
+
|
|
94
|
+
const payload = createTestPayload();
|
|
95
|
+
|
|
96
|
+
// Expect the function to throw an error with response payload
|
|
97
|
+
await expect(testEnv.run(notifyWebhook, payload)).rejects.toThrow(
|
|
98
|
+
`Webhook Notification to ${defaultParams.webhook} failed with status: 500 Internal Server Error - Response: {"error": "Database connection failed", "code": "DB_ERROR"}`
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
// Verify fetch was called with correct parameters
|
|
102
|
+
expect(mockFetch).toHaveBeenCalledWith(defaultParams.webhook, {
|
|
103
|
+
method: 'POST',
|
|
104
|
+
body: JSON.stringify({ message: 'Hello World' }),
|
|
105
|
+
headers: {
|
|
106
|
+
'Content-Type': 'application/json',
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Verify that text() was called to read the response
|
|
111
|
+
expect(mockResponse.text).toHaveBeenCalled();
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it("test POST network error", async () => {
|
|
115
|
+
// Mock fetch to throw a network error
|
|
116
|
+
const networkError = new Error('Network request failed');
|
|
117
|
+
mockFetch.mockRejectedValueOnce(networkError);
|
|
118
|
+
|
|
119
|
+
const payload = createTestPayload();
|
|
120
|
+
|
|
121
|
+
// Expect the function to throw the network error
|
|
122
|
+
await expect(testEnv.run(notifyWebhook, payload)).rejects.toThrow('Network request failed');
|
|
123
|
+
|
|
124
|
+
// Verify fetch was called with correct parameters
|
|
125
|
+
expect(mockFetch).toHaveBeenCalledWith(defaultParams.webhook, {
|
|
126
|
+
method: 'POST',
|
|
127
|
+
body: JSON.stringify({ message: 'Hello World' }),
|
|
128
|
+
headers: {
|
|
129
|
+
'Content-Type': 'application/json',
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
32
134
|
});
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { log } from "@temporalio/activity";
|
|
2
|
-
import {
|
|
2
|
+
import { VertesiaClient } from "@vertesia/client";
|
|
3
|
+
import { ApiVersions, DSLActivityExecutionPayload, DSLActivitySpec, WebHookSpec, WorkflowExecutionBaseParams } from "@vertesia/common";
|
|
3
4
|
import { setupActivity } from "../dsl/setup/ActivityContext.js";
|
|
4
5
|
import { WorkflowParamNotFoundError } from "../errors.js";
|
|
6
|
+
import { getVertesiaClientOptions } from "../utils/client.js";
|
|
5
7
|
|
|
6
8
|
export interface NotifyWebhookParams {
|
|
7
|
-
|
|
9
|
+
webhook: string | WebHookSpec; //URL to send the notification to
|
|
10
|
+
workflow_id: string; //The ID of the workflow sending the notification
|
|
11
|
+
workflow_type: string; //The type of workflow sending the notification (the wf function name)
|
|
12
|
+
workflow_run_id: string; //The ID of the specific workflow run sending the notification
|
|
13
|
+
event_name: string; //The event that triggered the notification (e.g. "completed", "failed", etc.)
|
|
14
|
+
detail?: Record<string, any>; // additional data about the event if any. It will be send to the webhook when using POST
|
|
15
|
+
//target_url: string; //URL to send the notification to
|
|
8
16
|
method: 'GET' | 'POST'; //HTTP method to use
|
|
9
|
-
|
|
10
|
-
headers?: Record<string, string>; //additional headers to send
|
|
17
|
+
headers?: Record<string, string>; // additional headers to send
|
|
11
18
|
}
|
|
12
19
|
|
|
20
|
+
export interface WebhookNotificationPayload {
|
|
21
|
+
workflow_id: string,
|
|
22
|
+
workflow_name: string,
|
|
23
|
+
workflow_run_id: string,
|
|
24
|
+
event_name: string,
|
|
25
|
+
detail?: Record<string, any>,
|
|
26
|
+
}
|
|
13
27
|
|
|
14
28
|
export interface NotifyWebhook extends DSLActivitySpec<NotifyWebhookParams> {
|
|
15
29
|
name: 'notifyWebhook';
|
|
@@ -19,32 +33,167 @@ export interface NotifyWebhook extends DSLActivitySpec<NotifyWebhookParams> {
|
|
|
19
33
|
export async function notifyWebhook(payload: DSLActivityExecutionPayload<NotifyWebhookParams>) {
|
|
20
34
|
|
|
21
35
|
const { params } = await setupActivity<NotifyWebhookParams>(payload);
|
|
22
|
-
const {
|
|
36
|
+
const { webhook, method, headers: defaultHeaders } = params
|
|
37
|
+
// resolve the url and the api version of the webhook
|
|
38
|
+
let target_url: string, version: number | undefined;
|
|
39
|
+
if (typeof webhook === 'string') {
|
|
40
|
+
target_url = webhook;
|
|
41
|
+
} else {
|
|
42
|
+
target_url = webhook.url;
|
|
43
|
+
version = webhook.version;
|
|
44
|
+
}
|
|
23
45
|
|
|
24
46
|
if (!target_url) throw new WorkflowParamNotFoundError('target_url');
|
|
25
47
|
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
const hasBody = params.detail && method === 'POST'; //body is sent only for POST
|
|
49
|
+
|
|
50
|
+
const headers = {
|
|
51
|
+
...defaultHeaders,
|
|
52
|
+
};
|
|
53
|
+
if (hasBody) {
|
|
54
|
+
headers['Content-Type'] = 'application/json';
|
|
55
|
+
}
|
|
56
|
+
const body = hasBody ? await createRequestBody(payload, params, version) : undefined
|
|
29
57
|
|
|
30
58
|
log.info(`Notifying webhook at ${target_url}`);
|
|
31
59
|
const res = await fetch(target_url, {
|
|
32
60
|
method,
|
|
33
61
|
body,
|
|
34
|
-
headers
|
|
35
|
-
'Content-Type': 'application/json',
|
|
36
|
-
...headers
|
|
37
|
-
},
|
|
62
|
+
headers,
|
|
38
63
|
}).catch(err => {
|
|
39
|
-
log.
|
|
40
|
-
throw
|
|
64
|
+
log.error(`An error occurred while notifying webhook at ${target_url}`, { err });
|
|
65
|
+
throw err;
|
|
41
66
|
});
|
|
42
67
|
|
|
43
68
|
if (!res.ok) {
|
|
44
|
-
log.warn(`
|
|
45
|
-
|
|
69
|
+
log.warn(`Webhook endpoint ${target_url} returned an error - ${res.status} ${res.statusText}`, { fetchResponse: res });
|
|
70
|
+
|
|
71
|
+
// Try to get response payload for error message
|
|
72
|
+
let errorMessage = `Webhook Notification to ${target_url} failed with status: ${res.status} ${res.statusText}`;
|
|
73
|
+
try {
|
|
74
|
+
const responseText = await res.text();
|
|
75
|
+
if (responseText) {
|
|
76
|
+
errorMessage += ` - Response: ${responseText}`;
|
|
77
|
+
}
|
|
78
|
+
} catch (readError) {
|
|
79
|
+
// If we can't read the response, just use the basic error message
|
|
80
|
+
log.debug('Could not read response body for error', { readError });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
throw new Error(errorMessage);
|
|
46
84
|
}
|
|
47
85
|
|
|
48
86
|
return { status: res.status, message: res.statusText, url: res.url }
|
|
49
87
|
|
|
50
88
|
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// --------------------------------------
|
|
93
|
+
// Data provider for webhooks
|
|
94
|
+
// this allows to customize the payload sent to the webhook depending on the
|
|
95
|
+
// type of workflow and the api version of the webhook
|
|
96
|
+
// --------------------------------------
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
function getWorkflowName(workflowType: string): string {
|
|
100
|
+
// remove trailing Workflow or _Workflow case insensitive from the workflow type
|
|
101
|
+
return workflowType.replace(/_?workflow$/i, '');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function createRequestBody(payload: WorkflowExecutionBaseParams, params: NotifyWebhookParams, api_version: number | undefined): Promise<string> {
|
|
105
|
+
if (api_version === undefined || Number(api_version) < ApiVersions.COMPLETION_RESULT_V1) {
|
|
106
|
+
return createOldRequestBody(payload, params);
|
|
107
|
+
} else {
|
|
108
|
+
return createLatestRequestBody(payload, params, api_version);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async function createLatestRequestBody(payload: WorkflowExecutionBaseParams, params: NotifyWebhookParams, api_version: number | undefined): Promise<string> {
|
|
113
|
+
const data = await createEventData(payload, params, api_version);
|
|
114
|
+
return JSON.stringify({
|
|
115
|
+
workflow_id: params.workflow_id,
|
|
116
|
+
workflow_name: getWorkflowName(params.workflow_type),
|
|
117
|
+
workflow_run_id: params.workflow_run_id,
|
|
118
|
+
event_name: params.event_name,
|
|
119
|
+
detail: data,
|
|
120
|
+
} satisfies WebhookNotificationPayload);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async function createEventData(payload: WorkflowExecutionBaseParams, params: NotifyWebhookParams, api_version: number | undefined): Promise<any> {
|
|
124
|
+
const data = params.detail;
|
|
125
|
+
if (data && data.run_id && params.event_name === "workflow_completed" && params.workflow_type === 'ExecuteInteractionWorkflow') {
|
|
126
|
+
const client = getVersionedVertesiaClient(payload, api_version); //ensure client is initialized
|
|
127
|
+
// we replace the result property with the full execution run object
|
|
128
|
+
return await client.runs.retrieve(data.run_id);
|
|
129
|
+
}
|
|
130
|
+
return data;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
function getVersionedVertesiaClient(payload: WorkflowExecutionBaseParams, version: string | number | undefined | null) {
|
|
135
|
+
// set the api version header
|
|
136
|
+
return new VertesiaClient(getVertesiaClientOptions(payload)).withApiVersion(version ? String(version) : null);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
// ----------------- Compatibility code -----------------
|
|
141
|
+
/* Before 2025-10-08 the notifyWebhook POST body was in the format:
|
|
142
|
+
|
|
143
|
+
{
|
|
144
|
+
"workflowId": "generation:ExecuteInteractionWorkflow:WhatColor:ox8wu6t4",
|
|
145
|
+
"runId": "0199c2c6-818f-77eb-b931-c1ba8b9e5184",
|
|
146
|
+
"status": "completed",
|
|
147
|
+
"result": {
|
|
148
|
+
"run_id": "68e616274b0e9bb510462378",
|
|
149
|
+
"status": "completed",
|
|
150
|
+
"result": {"Color": "white"}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
After Versions.COMPLETION_RESULT_V1 (20250925) when the completion result interface changed we improved the
|
|
155
|
+
payload to the current format:
|
|
156
|
+
|
|
157
|
+
{
|
|
158
|
+
"workflow_id": "generation:ExecuteInteractionWorkflow:WhatColor:bdedqjqj6",
|
|
159
|
+
"workflow_name": "ExecuteInteraction",
|
|
160
|
+
"workflow_run_id": "0199c2d4-6b1d-7cf2-a1e5-4cac6778091e",
|
|
161
|
+
"event_name": "workflow_completed",
|
|
162
|
+
"detail": ExecutionRun
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
where ExecutionRun contains a result property with the new completion result format.
|
|
166
|
+
|
|
167
|
+
"result": [
|
|
168
|
+
{
|
|
169
|
+
"type": "json",
|
|
170
|
+
"value": {
|
|
171
|
+
"Color": "white"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
//@ts-ignore
|
|
179
|
+
async function createOldRequestBody(payload: WorkflowExecutionBaseParams, params: NotifyWebhookParams): Promise<string> {
|
|
180
|
+
let data = params.detail;
|
|
181
|
+
if (data && data.run_id && params.event_name === "workflow_completed" && params.workflow_type === 'ExecuteInteractionWorkflow') {
|
|
182
|
+
const client = getVersionedVertesiaClient(payload, null); //ensure client is using no specific version
|
|
183
|
+
// Important Note: we cannot use client.runs.retrieve since it will transform the run result to the new format because of InteractionOutput
|
|
184
|
+
const run = await client.runs.get(data.run_id);
|
|
185
|
+
// since we use an unversioned client the run will be in old format so we don't need to tranform the result
|
|
186
|
+
const result = run.result;
|
|
187
|
+
data = {
|
|
188
|
+
workflowId: params.workflow_id,
|
|
189
|
+
runId: params.workflow_run_id,
|
|
190
|
+
status: params.event_name === 'workflow_completed' ? 'completed' : params.event_name,
|
|
191
|
+
result: {
|
|
192
|
+
run_id: run.id,
|
|
193
|
+
status: run.status,
|
|
194
|
+
result: result || null
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return JSON.stringify(data || {});
|
|
199
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DSLActivityExecutionPayload, RateLimitRequestPayload } from "@vertesia/common";
|
|
2
|
+
import { activityInfo, log } from "@temporalio/activity";
|
|
3
|
+
import { setupActivity } from "../dsl/setup/ActivityContext.js";
|
|
4
|
+
|
|
5
|
+
export interface RateLimitParams {
|
|
6
|
+
interactionIdOrEndpoint: string;
|
|
7
|
+
environmentId?: string;
|
|
8
|
+
modelId?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface RateLimitResult {
|
|
12
|
+
delayMs: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function checkRateLimit(payload: DSLActivityExecutionPayload<RateLimitParams>): Promise<RateLimitResult> {
|
|
16
|
+
const { client, params } = await setupActivity<RateLimitParams>(payload);
|
|
17
|
+
const { environmentId, modelId } = params;
|
|
18
|
+
|
|
19
|
+
const result: RateLimitResult = {
|
|
20
|
+
delayMs: 0,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
// Call the studio-server endpoint to get rate limit delay using the Vertesia client
|
|
25
|
+
const info = activityInfo();
|
|
26
|
+
const requestPayload: RateLimitRequestPayload = {
|
|
27
|
+
interaction: params.interactionIdOrEndpoint,
|
|
28
|
+
workflow_run_id: info.workflowExecution.runId,
|
|
29
|
+
environment_id: environmentId,
|
|
30
|
+
model_id: modelId,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const response = await client.interactions.requestSlot(requestPayload);
|
|
34
|
+
result.delayMs = response.delay_ms;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
log.warn('Failed to call rate limit API:', {error});
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return result;
|
|
41
|
+
}
|
package/src/conversion/image.ts
CHANGED
|
@@ -78,6 +78,12 @@ export async function imageResizer(
|
|
|
78
78
|
const command = `convert`
|
|
79
79
|
let args = [inputPath];
|
|
80
80
|
|
|
81
|
+
// Add JPEG shrink-on-load optimization
|
|
82
|
+
args.push("-define", `jpeg:size=${max_hw * 3}x${max_hw * 3}`);
|
|
83
|
+
|
|
84
|
+
// Remove metadata
|
|
85
|
+
args.push("-strip");
|
|
86
|
+
|
|
81
87
|
// https://usage.imagemagick.org/filter/nicolas/#downsample
|
|
82
88
|
// Add colorspace correction if enabled
|
|
83
89
|
if (colorspaceCorrection) {
|
|
@@ -110,9 +116,6 @@ export async function imageResizer(
|
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
|
|
113
|
-
// Add JPEG shrink-on-load optimization
|
|
114
|
-
args.push("-define", `jpeg:size=${max_hw * 3}x${max_hw * 3}`);
|
|
115
|
-
|
|
116
119
|
// Resize operation
|
|
117
120
|
args.push("-resize", `${max_hw}x${max_hw}>`);
|
|
118
121
|
|
package/src/dsl/dsl-workflow.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
log,
|
|
8
8
|
patched,
|
|
9
9
|
proxyActivities,
|
|
10
|
+
sleep,
|
|
10
11
|
startChild,
|
|
11
12
|
UntypedActivities,
|
|
12
13
|
} from "@temporalio/workflow";
|
|
@@ -18,6 +19,7 @@ import {
|
|
|
18
19
|
DSLWorkflowExecutionPayload,
|
|
19
20
|
DSLWorkflowSpec,
|
|
20
21
|
getDocumentIds,
|
|
22
|
+
getTenantId,
|
|
21
23
|
WorkflowExecutionPayload
|
|
22
24
|
} from "@vertesia/common";
|
|
23
25
|
import ms, { StringValue } from 'ms';
|
|
@@ -25,6 +27,8 @@ import { HandleDslErrorParams } from "../activities/handleError.js";
|
|
|
25
27
|
import * as activities from "../activities/index.js";
|
|
26
28
|
import { WF_NON_RETRYABLE_ERRORS, WorkflowParamNotFoundError } from "../errors.js";
|
|
27
29
|
import { Vars } from "./vars.js";
|
|
30
|
+
import { RateLimitParams } from "../activities/rateLimiter.js";
|
|
31
|
+
|
|
28
32
|
|
|
29
33
|
interface BaseActivityPayload extends WorkflowExecutionPayload {
|
|
30
34
|
workflow_name: string;
|
|
@@ -172,6 +176,7 @@ async function startChildWorkflow(step: DSLChildWorkflowStep, payload: DSLWorkfl
|
|
|
172
176
|
AccountId: [payload.account_id],
|
|
173
177
|
DocumentId: getDocumentIds(payload),
|
|
174
178
|
ProjectId: [payload.project_id],
|
|
179
|
+
TenantId: [getTenantId(payload.account_id, payload.project_id)],
|
|
175
180
|
InitiatedBy: payload.initiated_by ? [payload.initiated_by] : [],
|
|
176
181
|
},
|
|
177
182
|
});
|
|
@@ -204,6 +209,7 @@ async function executeChildWorkflow(step: DSLChildWorkflowStep, payload: DSLWork
|
|
|
204
209
|
AccountId: [payload.account_id],
|
|
205
210
|
DocumentId: getDocumentIds(payload),
|
|
206
211
|
ProjectId: [payload.project_id],
|
|
212
|
+
TenantId: [getTenantId(payload.account_id, payload.project_id)],
|
|
207
213
|
InitiatedBy: payload.initiated_by ? [payload.initiated_by] : [],
|
|
208
214
|
},
|
|
209
215
|
});
|
|
@@ -218,6 +224,54 @@ async function executeChildWorkflow(step: DSLChildWorkflowStep, payload: DSLWork
|
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
226
|
|
|
227
|
+
function buildRateLimitParams(activity: DSLActivitySpec, executionPayload: DSLActivityExecutionPayload<any>): RateLimitParams {
|
|
228
|
+
// resolve payload params
|
|
229
|
+
const vars = new Vars({
|
|
230
|
+
...executionPayload.params, // imported params (doesn't contain expressions)
|
|
231
|
+
...executionPayload.activity.params, // activity params (may contain expressions)
|
|
232
|
+
});
|
|
233
|
+
const params = vars.resolve();
|
|
234
|
+
|
|
235
|
+
let interactionId: string;
|
|
236
|
+
|
|
237
|
+
switch (activity.name) {
|
|
238
|
+
case "executeInteraction":
|
|
239
|
+
interactionId = params.interactionName;
|
|
240
|
+
break;
|
|
241
|
+
|
|
242
|
+
case "generateDocumentProperties":
|
|
243
|
+
interactionId = params.interactionName || "sys:ExtractInformation";
|
|
244
|
+
break;
|
|
245
|
+
|
|
246
|
+
case "identifyTextSections":
|
|
247
|
+
interactionId = params.interactionName || "sys:IdentifyTextSections";
|
|
248
|
+
break;
|
|
249
|
+
|
|
250
|
+
case "generateOrAssignContentType":
|
|
251
|
+
interactionId = params.interactionNames?.selectDocumentType || "sys:SelectDocumentType";
|
|
252
|
+
break;
|
|
253
|
+
|
|
254
|
+
case "chunkDocument":
|
|
255
|
+
interactionId = params.interactionName || "sys:ChunkDocument";
|
|
256
|
+
break;
|
|
257
|
+
|
|
258
|
+
default:
|
|
259
|
+
// For any other rate-limited activities, try to extract what we can
|
|
260
|
+
interactionId = params.interactionName;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (!interactionId) {
|
|
265
|
+
throw new Error(`No interaction ID could be determined for activity ${activity.name}`);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return {
|
|
269
|
+
interactionIdOrEndpoint: interactionId,
|
|
270
|
+
environmentId: params.environment,
|
|
271
|
+
modelId: params.model,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
221
275
|
async function runActivity(activity: DSLActivitySpec, basePayload: BaseActivityPayload, vars: Vars, defaultProxy: ActivityInterfaceFor<UntypedActivities>, defaultOptions: ActivityOptions) {
|
|
222
276
|
if (basePayload.debug_mode) {
|
|
223
277
|
log.debug(`Workflow vars before executing activity ${activity.name}`, { vars: vars.resolve() });
|
|
@@ -245,6 +299,38 @@ async function runActivity(activity: DSLActivitySpec, basePayload: BaseActivityP
|
|
|
245
299
|
});
|
|
246
300
|
}
|
|
247
301
|
|
|
302
|
+
if (patched('system-activity-taskqueue')) {
|
|
303
|
+
// hack: do nothing, remove later
|
|
304
|
+
// https://github.com/vertesia/composableai/pull/544/files
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// call rate limiter depending on the activity type
|
|
308
|
+
const rateLimitedActivities = [
|
|
309
|
+
"chunkDocument",
|
|
310
|
+
"executeInteraction",
|
|
311
|
+
"generateDocumentProperties",
|
|
312
|
+
"generateOrAssignContentType",
|
|
313
|
+
"identifyTextSections",
|
|
314
|
+
];
|
|
315
|
+
|
|
316
|
+
if (activity.name && rateLimitedActivities.includes(activity.name)) {
|
|
317
|
+
log.info(`Applying rate limit for activity ${activity.name}`);
|
|
318
|
+
// Apply rate limiting logic here
|
|
319
|
+
// Check rate limit first - loop until no delay
|
|
320
|
+
const rateLimitParams = buildRateLimitParams(activity, executionPayload);
|
|
321
|
+
|
|
322
|
+
const rateLimitPayload = dslActivityPayload(basePayload, activity, rateLimitParams);
|
|
323
|
+
let rateLimitResult = await proxy.checkRateLimit(rateLimitPayload);
|
|
324
|
+
|
|
325
|
+
while (rateLimitResult.delayMs > 0) {
|
|
326
|
+
log.info(`Rate limit delay applied: ${rateLimitResult.delayMs}ms`);
|
|
327
|
+
await sleep(rateLimitResult.delayMs);
|
|
328
|
+
|
|
329
|
+
// Check again after sleeping
|
|
330
|
+
rateLimitResult = await proxy.checkRateLimit(rateLimitPayload);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
248
334
|
const fn = proxy[activity.name];
|
|
249
335
|
if (activity.parallel) {
|
|
250
336
|
//TODO execute in parallel
|
|
@@ -129,6 +129,7 @@ describe('DSL Workflow with child workflows', () => {
|
|
|
129
129
|
AccountId: protos.temporal.api.enums.v1.IndexedValueType.INDEXED_VALUE_TYPE_KEYWORD,
|
|
130
130
|
DocumentId: protos.temporal.api.enums.v1.IndexedValueType.INDEXED_VALUE_TYPE_KEYWORD,
|
|
131
131
|
ProjectId: protos.temporal.api.enums.v1.IndexedValueType.INDEXED_VALUE_TYPE_KEYWORD,
|
|
132
|
+
TenantId: protos.temporal.api.enums.v1.IndexedValueType.INDEXED_VALUE_TYPE_KEYWORD,
|
|
132
133
|
InitiatedBy: protos.temporal.api.enums.v1.IndexedValueType.INDEXED_VALUE_TYPE_KEYWORD,
|
|
133
134
|
},
|
|
134
135
|
});
|