@gptmarket/temporal-types 0.0.2 → 0.0.4
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/index.ts +19 -26
- package/package.json +12 -5
- package/registry.ts +5 -4
- package/schemas/RubyInput.json +3 -3
- package/{client.ts → server.ts} +2 -1
- package/types.ts +2 -2
package/index.ts
CHANGED
|
@@ -1,43 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @gptmarket/temporal-types
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* TypeScript types and workflow registry for GPTMarket Temporal workflows.
|
|
5
|
+
* This entry point is browser-safe - no Node.js dependencies.
|
|
5
6
|
*
|
|
6
|
-
* @example
|
|
7
|
+
* @example Client-side (React components, dynamic forms)
|
|
7
8
|
* ```ts
|
|
8
|
-
* import {
|
|
9
|
+
* import { workflowRegistry, ruby } from '@gptmarket/temporal-types';
|
|
9
10
|
* import type { RubyInput, RubyOutput } from '@gptmarket/temporal-types';
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
12
|
+
* // Build dynamic UI from workflow definitions
|
|
13
|
+
* ruby.fields.forEach(field => {
|
|
14
|
+
* console.log(field.name, field.type, field.options);
|
|
15
|
+
* });
|
|
13
16
|
* ```
|
|
14
17
|
*
|
|
15
|
-
* @example
|
|
18
|
+
* @example Server-side (API routes, server actions)
|
|
16
19
|
* ```ts
|
|
17
|
-
* import {
|
|
20
|
+
* import { startWorkflow, waitForWorkflow } from '@gptmarket/temporal-types/server';
|
|
21
|
+
* import type { RubyInput, RubyOutput } from '@gptmarket/temporal-types';
|
|
18
22
|
*
|
|
19
|
-
* const
|
|
20
|
-
*
|
|
21
|
-
* console.log(field.name, field.type, field.options);
|
|
22
|
-
* });
|
|
23
|
+
* const { workflowId } = await startWorkflow('RubyWorkflow', { topic: 'AI news' });
|
|
24
|
+
* const { result } = await waitForWorkflow<RubyOutput>(workflowId);
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
27
|
|
|
26
|
-
// Types
|
|
28
|
+
// Types (browser-safe)
|
|
27
29
|
export * from "./types";
|
|
28
30
|
|
|
29
|
-
// Workflow registry and definitions
|
|
31
|
+
// Workflow registry and definitions (browser-safe)
|
|
30
32
|
export * from "./registry";
|
|
31
33
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
getTemporalClient,
|
|
36
|
-
getTaskQueue,
|
|
37
|
-
startWorkflow,
|
|
38
|
-
getWorkflowProgress,
|
|
39
|
-
waitForWorkflow,
|
|
40
|
-
cancelWorkflow,
|
|
41
|
-
getWorkflowHandle,
|
|
42
|
-
} from "./client";
|
|
43
|
-
export type { TemporalConfig, StartWorkflowResult } from "./client";
|
|
34
|
+
// NOTE: Server utilities are intentionally NOT exported from this entry point.
|
|
35
|
+
// Import from '@gptmarket/temporal-types/server' for server-side code.
|
|
36
|
+
// This prevents bundlers from pulling in @temporalio/client dependencies.
|
package/package.json
CHANGED
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gptmarket/temporal-types",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "TypeScript types
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "TypeScript types and workflow registry for GPTMarket Temporal workflows",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "index.ts",
|
|
7
|
+
"sideEffects": false,
|
|
7
8
|
"exports": {
|
|
8
9
|
".": "./index.ts",
|
|
9
10
|
"./types": "./types.ts",
|
|
10
11
|
"./registry": "./registry.ts",
|
|
11
|
-
"./
|
|
12
|
+
"./server": "./server.ts"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
14
15
|
"index.ts",
|
|
15
16
|
"types.ts",
|
|
16
17
|
"registry.ts",
|
|
17
|
-
"
|
|
18
|
+
"server.ts",
|
|
18
19
|
"schemas/"
|
|
19
20
|
],
|
|
20
21
|
"peerDependencies": {
|
|
21
22
|
"@temporalio/client": ">=1.0.0"
|
|
22
23
|
},
|
|
24
|
+
"peerDependenciesMeta": {
|
|
25
|
+
"@temporalio/client": {
|
|
26
|
+
"optional": true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
23
29
|
"keywords": [
|
|
24
30
|
"temporal",
|
|
25
31
|
"gptmarket",
|
|
26
32
|
"types",
|
|
27
33
|
"typescript",
|
|
28
|
-
"workflows"
|
|
34
|
+
"workflows",
|
|
35
|
+
"registry"
|
|
29
36
|
],
|
|
30
37
|
"license": "MIT",
|
|
31
38
|
"repository": {
|
package/registry.ts
CHANGED
|
@@ -92,10 +92,11 @@ export const ruby: WorkflowDefinition<Types.RubyInput, Types.RubyOutput> = {
|
|
|
92
92
|
],
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
|
-
name: "
|
|
96
|
-
type: "
|
|
97
|
-
label: "
|
|
98
|
-
description:
|
|
95
|
+
name: "text_overlay",
|
|
96
|
+
type: "textarea",
|
|
97
|
+
label: "Text Overlay",
|
|
98
|
+
description:
|
|
99
|
+
'Text to display on video (e.g., "You won\'t believe this...")',
|
|
99
100
|
required: false,
|
|
100
101
|
default: "",
|
|
101
102
|
},
|
package/schemas/RubyInput.json
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"title": "Emotion",
|
|
13
13
|
"type": "string"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
15
|
+
"text_overlay": {
|
|
16
16
|
"default": "",
|
|
17
|
-
"description": "Text
|
|
18
|
-
"title": "
|
|
17
|
+
"description": "Text to display on video (e.g., \"You won't believe this...\")",
|
|
18
|
+
"title": "Text Overlay",
|
|
19
19
|
"type": "string"
|
|
20
20
|
},
|
|
21
21
|
"style": {
|
package/{client.ts → server.ts}
RENAMED
package/types.ts
CHANGED
|
@@ -40,8 +40,8 @@ export interface RubyInput {
|
|
|
40
40
|
topic: string;
|
|
41
41
|
/** Emotion: shocked, scared, surprised, worried, excited */
|
|
42
42
|
emotion?: string;
|
|
43
|
-
/** Text
|
|
44
|
-
|
|
43
|
+
/** Text to display on video (e.g., "You won't believe this...") */
|
|
44
|
+
text_overlay?: string;
|
|
45
45
|
/** Style: realistic or stylized */
|
|
46
46
|
style?: string;
|
|
47
47
|
/** Gender: female or male */
|