@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 CHANGED
@@ -1,43 +1,36 @@
1
1
  /**
2
- * GPTMarket Temporal Types
2
+ * @gptmarket/temporal-types
3
3
  *
4
- * Types, workflow registry, and client utilities for GPTMarket Temporal workflows.
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 Start a workflow
7
+ * @example Client-side (React components, dynamic forms)
7
8
  * ```ts
8
- * import { startWorkflow, waitForWorkflow } from '@gptmarket/temporal-types/client';
9
+ * import { workflowRegistry, ruby } from '@gptmarket/temporal-types';
9
10
  * import type { RubyInput, RubyOutput } from '@gptmarket/temporal-types';
10
11
  *
11
- * const { workflowId } = await startWorkflow('RubyWorkflow', { topic: 'AI news' });
12
- * const { result } = await waitForWorkflow<RubyOutput>(workflowId);
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 Dynamic form generation
18
+ * @example Server-side (API routes, server actions)
16
19
  * ```ts
17
- * import { workflowRegistry } from '@gptmarket/temporal-types';
20
+ * import { startWorkflow, waitForWorkflow } from '@gptmarket/temporal-types/server';
21
+ * import type { RubyInput, RubyOutput } from '@gptmarket/temporal-types';
18
22
  *
19
- * const ruby = workflowRegistry.ruby;
20
- * ruby.fields.forEach(field => {
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
- // Client utilities
33
- export {
34
- configureTemporalClient,
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.2",
4
- "description": "TypeScript types, workflow registry, and client utilities for GPTMarket Temporal workflows",
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
- "./client": "./client.ts"
12
+ "./server": "./server.ts"
12
13
  },
13
14
  "files": [
14
15
  "index.ts",
15
16
  "types.ts",
16
17
  "registry.ts",
17
- "client.ts",
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: "hook",
96
- type: "text",
97
- label: "Hook",
98
- description: 'Text overlay (e.g., "You won\'t believe this...")',
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
  },
@@ -12,10 +12,10 @@
12
12
  "title": "Emotion",
13
13
  "type": "string"
14
14
  },
15
- "hook": {
15
+ "text_overlay": {
16
16
  "default": "",
17
- "description": "Text overlay (e.g., \"You won't believe this...\")",
18
- "title": "Hook",
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": {
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Temporal client utilities for Next.js.
2
+ * Temporal server utilities for Next.js.
3
+ * Use in API routes, server actions, and server components only.
3
4
  * Auto-generated - DO NOT EDIT MANUALLY
4
5
  */
5
6
 
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 overlay (e.g., "You won't believe this...") */
44
- hook?: string;
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 */