@zodic/shared 0.0.49 → 0.0.51

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.
@@ -26,7 +26,7 @@ export class ConceptService {
26
26
  conceptSlug,
27
27
  });
28
28
 
29
- const response = await this.context.api().callChatGPT(messages, {});
29
+ const response = await this.context.api().callChatGPT.single(messages, {});
30
30
  if (!response) {
31
31
  throw new Error(
32
32
  `Failed to generate basic info for concept: ${conceptSlug}`
@@ -92,7 +92,7 @@ export class ConceptService {
92
92
  combination: combinationString,
93
93
  });
94
94
 
95
- const response = await this.context.api().callChatGPT(messages, {});
95
+ const response = await this.context.api().callChatGPT.single(messages, {});
96
96
  if (!response) {
97
97
  throw new Error(
98
98
  `Failed to generate Leonardo prompt for concept: ${conceptSlug}`
@@ -135,7 +135,7 @@ export class ConceptService {
135
135
  poem: concept.poem,
136
136
  });
137
137
 
138
- const response = await this.context.api().callChatGPT(messages, {});
138
+ const response = await this.context.api().callChatGPT.single(messages, {});
139
139
  if (!response) {
140
140
  throw new Error(`Failed to generate content for concept: ${conceptSlug}`);
141
141
  }
@@ -1,5 +1,5 @@
1
1
  import { inject } from 'inversify';
2
- import { ConceptPhase } from '../../types/scopes/legacy';
2
+ import { ConceptPhase } from '../../types';
3
3
  import { ConceptService } from '../services/ConceptService';
4
4
 
5
5
  export class ConceptWorkflow {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,5 +1,3 @@
1
- import { ConceptPhase } from "./legacy";
2
-
3
1
  export type Provider = 'google' | 'facebook';
4
2
 
5
3
  export type ProviderInfo = {
@@ -9,6 +7,29 @@ export type ProviderInfo = {
9
7
  resourceUrl: string;
10
8
  };
11
9
 
10
+ export type CelestialBody =
11
+ | 'Sun'
12
+ | 'Moon'
13
+ | 'Mercury'
14
+ | 'Venus'
15
+ | 'Mars'
16
+ | 'Jupiter'
17
+ | 'Saturn'
18
+ | 'Neptune'
19
+ | 'Uranus'
20
+ | 'Pluto'
21
+ | 'Ascendant'
22
+ | 'Descendant'
23
+ | 'Midheaven'
24
+ | 'Imum Coeli'
25
+ | 'North Node'
26
+ | 'South Node'
27
+ | 'Chiron'
28
+ | 'Pars Fortuna'
29
+ | 'Lilith'
30
+ | 'Vertex'
31
+ | 'Antivertex';
32
+
12
33
  export const VALID_GENDERS_ARRAY = ['male', 'female', 'non-binary'] as const;
13
34
 
14
35
  export type Gender = (typeof VALID_GENDERS_ARRAY)[number];
@@ -167,14 +188,14 @@ export type ChatGPTBatchResponse = {
167
188
  input_file_id: string; // ID of the input file
168
189
  completion_window: string; // Time window for completions (e.g., "24h")
169
190
  status:
170
- | "validating"
171
- | "in_progress"
172
- | "finalizing"
173
- | "completed"
174
- | "failed"
175
- | "expired"
176
- | "cancelling"
177
- | "cancelled"; // Current status of the batch
191
+ | 'validating'
192
+ | 'in_progress'
193
+ | 'finalizing'
194
+ | 'completed'
195
+ | 'failed'
196
+ | 'expired'
197
+ | 'cancelling'
198
+ | 'cancelled'; // Current status of the batch
178
199
  output_file_id: string | null; // ID of the output file, if available
179
200
  error_file_id: string | null; // ID of the error file, if available
180
201
  created_at: number; // Timestamp when the batch was created
@@ -218,4 +239,17 @@ export type ChatGPTFileUploadResponse = {
218
239
  created_at: number; // Timestamp when the file was created
219
240
  filename: string; // Name of the uploaded file
220
241
  purpose: string; // Purpose of the file, e.g., "fine-tune"
221
- };
242
+ };
243
+
244
+ export type ConceptPhase =
245
+ | 'basic-info'
246
+ | 'leonardo-prompt'
247
+ | 'content'
248
+ | 'images';
249
+
250
+ export const ConceptPhases: Record<string, ConceptPhase> = {
251
+ BASIC_INFO: 'basic-info',
252
+ LEONARDO_PROMPT: 'leonardo-prompt',
253
+ CONTENT: 'content',
254
+ IMAGES: 'images',
255
+ };
@@ -1,11 +1,7 @@
1
1
  import { BackendBindings } from './cloudflare';
2
2
  import { Gender } from './generic';
3
3
 
4
- export type ConceptPhase =
5
- | 'basic-info'
6
- | 'leonardo-prompt'
7
- | 'content'
8
- | 'images';
4
+
9
5
 
10
6
  export const zodiacSigns = [
11
7
  'Aries',