@animaapp/anima-sdk 0.6.20 → 0.6.22
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,10 @@ export declare type BaseResult = {
|
|
|
91
91
|
tokenUsage: number;
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
+
export declare type BaseSettings = {
|
|
95
|
+
codegenSettings?: Record<string, unknown>;
|
|
96
|
+
};
|
|
97
|
+
|
|
94
98
|
export declare class CodegenError extends Error {
|
|
95
99
|
status?: number;
|
|
96
100
|
detail?: unknown;
|
|
@@ -119,7 +123,7 @@ export declare type CodegenResult = BaseResult & {
|
|
|
119
123
|
*/
|
|
120
124
|
export declare type CodegenRouteErrorReason = "Not all frames id from responsive pages are mentioned on the nodes id list" | "Too many screens to import";
|
|
121
125
|
|
|
122
|
-
export declare type CodegenSettings = {
|
|
126
|
+
export declare type CodegenSettings = BaseSettings & {
|
|
123
127
|
language?: "typescript" | "javascript";
|
|
124
128
|
model?: string;
|
|
125
129
|
framework: "react" | "html";
|
|
@@ -142,7 +146,7 @@ export declare type CodegenSettings = {
|
|
|
142
146
|
enableDisplayDataId?: boolean;
|
|
143
147
|
enableDisplayDataName?: boolean;
|
|
144
148
|
url?: string;
|
|
145
|
-
|
|
149
|
+
prompt?: string;
|
|
146
150
|
};
|
|
147
151
|
|
|
148
152
|
/**
|
|
@@ -327,7 +331,7 @@ export declare type GetCodeFromPromptParams = {
|
|
|
327
331
|
webhookUrl?: string;
|
|
328
332
|
};
|
|
329
333
|
|
|
330
|
-
export declare type GetCodeFromPromptSettings = {
|
|
334
|
+
export declare type GetCodeFromPromptSettings = BaseSettings & {
|
|
331
335
|
language?: "typescript";
|
|
332
336
|
framework: "react" | "html";
|
|
333
337
|
styling: "tailwind" | "inline_styles";
|
|
@@ -368,7 +372,7 @@ export declare type GetCodeFromWebsiteParams = {
|
|
|
368
372
|
webhookUrl?: string;
|
|
369
373
|
};
|
|
370
374
|
|
|
371
|
-
export declare type GetCodeFromWebsiteSettings = {
|
|
375
|
+
export declare type GetCodeFromWebsiteSettings = BaseSettings & {
|
|
372
376
|
language?: "typescript";
|
|
373
377
|
framework: "react" | "html";
|
|
374
378
|
styling: "tailwind" | "inline_styles";
|
package/dist/index.js
CHANGED
|
@@ -3990,12 +3990,13 @@ class ea {
|
|
|
3990
3990
|
*/
|
|
3991
3991
|
generateCodeFromPrompt(n) {
|
|
3992
3992
|
return C(this, arguments, function* (e, t = {}, s) {
|
|
3993
|
+
var o;
|
|
3993
3994
|
let a = e.tracking;
|
|
3994
3995
|
A(this, E) && "userId" in A(this, E) && A(this, E).userId && (a != null && a.externalId || (a = { externalId: A(this, E).userId }));
|
|
3995
3996
|
const i = {
|
|
3996
3997
|
tracking: a,
|
|
3997
3998
|
assetsStorage: e.assetsStorage,
|
|
3998
|
-
params: {
|
|
3999
|
+
params: u({
|
|
3999
4000
|
prompt: e.prompt,
|
|
4000
4001
|
conventions: {
|
|
4001
4002
|
language: e.settings.language,
|
|
@@ -4003,7 +4004,7 @@ class ea {
|
|
|
4003
4004
|
styling: e.settings.styling,
|
|
4004
4005
|
uiLibrary: e.settings.uiLibrary
|
|
4005
4006
|
}
|
|
4006
|
-
},
|
|
4007
|
+
}, (o = e.settings.codegenSettings) != null ? o : {}),
|
|
4007
4008
|
webhookUrl: e.webhookUrl
|
|
4008
4009
|
};
|
|
4009
4010
|
return console.log("P2C Request Body:", JSON.stringify(i, null, 2)), Se(this, ie, De).call(this, "/v1/p2c", i, t, "p2c", s);
|