@wix/ditto-codegen-public 1.0.64 → 1.0.65
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/out.js +58 -0
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -77738,6 +77738,58 @@ ${apiDocs}
|
|
|
77738
77738
|
}
|
|
77739
77739
|
});
|
|
77740
77740
|
|
|
77741
|
+
// dist/system-prompts/useElevate.js
|
|
77742
|
+
var require_useElevate = __commonJS({
|
|
77743
|
+
"dist/system-prompts/useElevate.js"(exports2) {
|
|
77744
|
+
"use strict";
|
|
77745
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
77746
|
+
exports2.useElevate = void 0;
|
|
77747
|
+
var useElevate = () => {
|
|
77748
|
+
return `
|
|
77749
|
+
<authentication_elevation_requirement>
|
|
77750
|
+
When doing API calls, you have to elevate permissions.
|
|
77751
|
+
<example>
|
|
77752
|
+
|
|
77753
|
+
\`\`\`typescript
|
|
77754
|
+
import { auth } from "@wix/essentials";
|
|
77755
|
+
import { items } from "@wix/data";
|
|
77756
|
+
export const myFunction = async () => {
|
|
77757
|
+
const elevatedFunction = auth.elevate(items.query);
|
|
77758
|
+
const elevatedResponse = await elevatedFunction("myCollection");
|
|
77759
|
+
return elevatedResponse;
|
|
77760
|
+
});
|
|
77761
|
+
\`\`\`
|
|
77762
|
+
|
|
77763
|
+
</example>
|
|
77764
|
+
<example>
|
|
77765
|
+
\`\`\`typescript
|
|
77766
|
+
import { auth } from "@wix/essentials";
|
|
77767
|
+
import { cart } from "@wix/ecom";
|
|
77768
|
+
export const myFunction = async () => {
|
|
77769
|
+
const elevatedFunction = auth.elevate(cart.getCart);
|
|
77770
|
+
const elevatedResponse = await elevatedFunction("cart-id");
|
|
77771
|
+
return elevatedResponse;
|
|
77772
|
+
};
|
|
77773
|
+
\`\`\`
|
|
77774
|
+
</example>
|
|
77775
|
+
<example>
|
|
77776
|
+
\`\`\`typescript
|
|
77777
|
+
import { auth } from "@wix/essentials";
|
|
77778
|
+
import { products } from "@wix/stores";
|
|
77779
|
+
export const myFunction = async () => {
|
|
77780
|
+
const elevatedFunction = auth.elevate(products.deleteCollection);
|
|
77781
|
+
const elevatedResponse = await elevatedFunction("collection-id");
|
|
77782
|
+
return elevatedResponse;
|
|
77783
|
+
};
|
|
77784
|
+
\`\`\`
|
|
77785
|
+
</example>
|
|
77786
|
+
</authentication_elevation_requirement>
|
|
77787
|
+
`;
|
|
77788
|
+
};
|
|
77789
|
+
exports2.useElevate = useElevate;
|
|
77790
|
+
}
|
|
77791
|
+
});
|
|
77792
|
+
|
|
77741
77793
|
// dist/system-prompts/servicePlugin/servicePluginPrompt.js
|
|
77742
77794
|
var require_servicePluginPrompt = __commonJS({
|
|
77743
77795
|
"dist/system-prompts/servicePlugin/servicePluginPrompt.js"(exports2) {
|
|
@@ -77747,9 +77799,11 @@ var require_servicePluginPrompt = __commonJS({
|
|
|
77747
77799
|
exports2.getServicePluginPrompt = getServicePluginPrompt;
|
|
77748
77800
|
var servicePluginDocLoader_1 = require_servicePluginDocLoader();
|
|
77749
77801
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
77802
|
+
var useElevate_1 = require_useElevate();
|
|
77750
77803
|
function getServicePluginPrompt(spiNames = [], apiNames = []) {
|
|
77751
77804
|
const servicePluginDocs = (0, servicePluginDocLoader_1.loadServicePluginDocumentation)(spiNames);
|
|
77752
77805
|
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames);
|
|
77806
|
+
const elevate = (0, useElevate_1.useElevate)();
|
|
77753
77807
|
return `
|
|
77754
77808
|
<WIXCLI_SERVICE_PLUGIN_SYSTEM_PROMPT>
|
|
77755
77809
|
|
|
@@ -77862,6 +77916,7 @@ When integrating with external services:
|
|
|
77862
77916
|
<available_service_plugins>
|
|
77863
77917
|
${servicePluginDocs}
|
|
77864
77918
|
</available_service_plugins>
|
|
77919
|
+
${elevate}
|
|
77865
77920
|
${apiDocs}
|
|
77866
77921
|
`;
|
|
77867
77922
|
}
|
|
@@ -124954,8 +125009,10 @@ var require_backendEventPrompt = __commonJS({
|
|
|
124954
125009
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124955
125010
|
exports2.backendEventPrompt = void 0;
|
|
124956
125011
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
125012
|
+
var useElevate_1 = require_useElevate();
|
|
124957
125013
|
var backendEventPrompt = (apiNames) => {
|
|
124958
125014
|
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames);
|
|
125015
|
+
const elevate = (0, useElevate_1.useElevate)();
|
|
124959
125016
|
return `<BACKEND_EVENT_PROMPT>
|
|
124960
125017
|
<role>
|
|
124961
125018
|
You are a Wix backend event handler generator. Create event extensions for Wix CLI apps using the JavaScript SDK. Events are triggered when specific conditions on the app or user's site are met.
|
|
@@ -124989,6 +125046,7 @@ You are a Wix backend event handler generator. Create event extensions for Wix C
|
|
|
124989
125046
|
- Reference the corresponding SDK submodule category for event-specific information
|
|
124990
125047
|
- Events run automatically when triggered - no manual invocation needed
|
|
124991
125048
|
</implementation_guidelines>
|
|
125049
|
+
${elevate}
|
|
124992
125050
|
${apiDocs}
|
|
124993
125051
|
</BACKEND_EVENT_PROMPT>`;
|
|
124994
125052
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@wix/ditto-codegen": "1.0.0",
|
|
25
25
|
"esbuild": "^0.25.9"
|
|
26
26
|
},
|
|
27
|
-
"falconPackageHash": "
|
|
27
|
+
"falconPackageHash": "6750c6cff17349339dffb2a673c6fb3163e22d7cae347615e3ed0e33"
|
|
28
28
|
}
|