@wix/ditto-codegen-public 1.0.274 → 1.0.276

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.
Files changed (80) hide show
  1. package/dist/out.js +5 -5
  2. package/package.json +2 -2
  3. package/dist/examples-apps/ai-chatbot/.nvmrc +0 -1
  4. package/dist/examples-apps/ai-chatbot/README.md +0 -21
  5. package/dist/examples-apps/ai-chatbot/package-lock.json +0 -7266
  6. package/dist/examples-apps/ai-chatbot/package.json +0 -35
  7. package/dist/examples-apps/ai-chatbot/src/dashboard/pages/product/ProductChat.module.css +0 -3
  8. package/dist/examples-apps/ai-chatbot/src/dashboard/pages/product/ProductChat.tsx +0 -108
  9. package/dist/examples-apps/ai-chatbot/src/dashboard/pages/product/page.tsx +0 -100
  10. package/dist/examples-apps/ai-chatbot/src/dashboard/withProviders.tsx +0 -15
  11. package/dist/examples-apps/ai-chatbot/src/env.d.ts +0 -4
  12. package/dist/examples-apps/ai-chatbot/src/types.ts +0 -4
  13. package/dist/examples-apps/ai-chatbot/tsconfig.json +0 -8
  14. package/dist/examples-apps/ai-chatbot/wix.config.json +0 -5
  15. package/dist/examples-apps/contact-created-logger/package-lock.json +0 -15102
  16. package/dist/examples-apps/contact-created-logger/package.json +0 -37
  17. package/dist/examples-apps/contact-created-logger/src/backend/events/contact-created-logger/event.ts +0 -56
  18. package/dist/examples-apps/contact-created-logger/tsconfig.json +0 -5
  19. package/dist/examples-apps/contact-created-logger/wix.config.json +0 -4
  20. package/dist/examples-apps/coupon-popup/README.md +0 -13
  21. package/dist/examples-apps/coupon-popup/package.json +0 -43
  22. package/dist/examples-apps/coupon-popup/src/extensions.ts +0 -12
  23. package/dist/examples-apps/coupon-popup/src/index.ts +0 -2
  24. package/dist/examples-apps/coupon-popup/src/site/embedded-scripts/cart-coupon-popup/embedded.html +0 -562
  25. package/dist/examples-apps/coupon-popup/src/site/embedded-scripts/cart-coupon-popup/extensions.ts +0 -8
  26. package/dist/examples-apps/coupon-popup/tsconfig.json +0 -10
  27. package/dist/examples-apps/coupon-popup/wix.config.json +0 -4
  28. package/dist/examples-apps/custom-element/countdown-widget/components/ColorPickerField.tsx +0 -27
  29. package/dist/examples-apps/custom-element/countdown-widget/components/FontPickerField.tsx +0 -34
  30. package/dist/examples-apps/custom-element/countdown-widget/components/Separator.tsx +0 -10
  31. package/dist/examples-apps/custom-element/countdown-widget/components/TimeBlock.tsx +0 -23
  32. package/dist/examples-apps/custom-element/countdown-widget/extensions.ts +0 -18
  33. package/dist/examples-apps/custom-element/countdown-widget/panel.tsx +0 -146
  34. package/dist/examples-apps/custom-element/countdown-widget/styles.ts +0 -73
  35. package/dist/examples-apps/custom-element/countdown-widget/utils.ts +0 -46
  36. package/dist/examples-apps/custom-element/countdown-widget/widget.tsx +0 -97
  37. package/dist/examples-apps/product-created-logger/package-lock.json +0 -15102
  38. package/dist/examples-apps/product-created-logger/package.json +0 -37
  39. package/dist/examples-apps/product-created-logger/src/backend/events/product-created-logger/event.ts +0 -66
  40. package/dist/examples-apps/product-created-logger/tsconfig.json +0 -5
  41. package/dist/examples-apps/product-created-logger/wix.config.json +0 -4
  42. package/dist/examples-apps/react-builder/component.tsx +0 -123
  43. package/dist/examples-apps/react-builder/components/Badge.tsx +0 -14
  44. package/dist/examples-apps/react-builder/components/Button.tsx +0 -31
  45. package/dist/examples-apps/react-builder/components/Counter.tsx +0 -14
  46. package/dist/examples-apps/react-builder/components/FeaturedImage.tsx +0 -31
  47. package/dist/examples-apps/react-builder/components/SocialLinks.tsx +0 -61
  48. package/dist/examples-apps/react-builder/components/Subtitle.tsx +0 -11
  49. package/dist/examples-apps/react-builder/components/Tags.tsx +0 -25
  50. package/dist/examples-apps/react-builder/components/Title.tsx +0 -11
  51. package/dist/examples-apps/react-builder/components/index.ts +0 -8
  52. package/dist/examples-apps/react-builder/manifest.json +0 -345
  53. package/dist/examples-apps/react-builder/style.css +0 -197
  54. package/dist/examples-apps/react-builder/types.ts +0 -70
  55. package/dist/examples-apps/spis-examples/.nvmrc +0 -1
  56. package/dist/examples-apps/spis-examples/README.md +0 -21
  57. package/dist/examples-apps/spis-examples/package-lock.json +0 -6903
  58. package/dist/examples-apps/spis-examples/package.json +0 -32
  59. package/dist/examples-apps/spis-examples/src/backend/service-plugins/ecom-additional-fees/additional-fees/plugin.ts +0 -66
  60. package/dist/examples-apps/spis-examples/src/backend/service-plugins/ecom-discount-triggers/discount-triggers/plugin.ts +0 -42
  61. package/dist/examples-apps/spis-examples/src/backend/service-plugins/ecom-gift-cards/gift-cards/plugin.ts +0 -38
  62. package/dist/examples-apps/spis-examples/src/backend/service-plugins/ecom-shipping-rates/shipping-rates/plugin.ts +0 -34
  63. package/dist/examples-apps/spis-examples/src/backend/service-plugins/ecom-validations/validations/plugin.ts +0 -24
  64. package/dist/examples-apps/spis-examples/src/env.d.ts +0 -4
  65. package/dist/examples-apps/spis-examples/tsconfig.json +0 -8
  66. package/dist/examples-apps/spis-examples/wix.config.json +0 -5
  67. package/dist/examples-apps/survey-manager/README.md +0 -21
  68. package/dist/examples-apps/survey-manager/package-lock.json +0 -14252
  69. package/dist/examples-apps/survey-manager/package.json +0 -36
  70. package/dist/examples-apps/survey-manager/src/dashboard/pages/apis.ts +0 -116
  71. package/dist/examples-apps/survey-manager/src/dashboard/pages/components/PageLoader.tsx +0 -23
  72. package/dist/examples-apps/survey-manager/src/dashboard/pages/components/QuestionModal.tsx +0 -84
  73. package/dist/examples-apps/survey-manager/src/dashboard/pages/components/QuestionsTable.tsx +0 -139
  74. package/dist/examples-apps/survey-manager/src/dashboard/pages/components/SurveyPageLayout.tsx +0 -99
  75. package/dist/examples-apps/survey-manager/src/dashboard/pages/components/SurveyStats.tsx +0 -50
  76. package/dist/examples-apps/survey-manager/src/dashboard/pages/page.tsx +0 -171
  77. package/dist/examples-apps/survey-manager/src/dashboard/pages/types.ts +0 -28
  78. package/dist/examples-apps/survey-manager/tsconfig.json +0 -8
  79. package/dist/examples-apps/survey-manager/wix.config.json +0 -4
  80. package/dist/opencode-tools/wds-lookup.ts +0 -134
@@ -1,32 +0,0 @@
1
- {
2
- "name": "spis-examples",
3
- "version": "1.0.0",
4
- "private": true,
5
- "dependencies": {
6
- "@wix/dashboard": "^1.3.36",
7
- "@wix/design-system": "^1.0.0",
8
- "@wix/wix-ui-icons-common": "^3.0.0",
9
- "@wix/ecom": "^1.0.668"
10
- },
11
- "devDependencies": {
12
- "@types/react": "^16.0.0",
13
- "@wix/data": "^1.0.290",
14
- "@types/react-dom": "^16.0.0",
15
- "@wix/cli": "^1.0.0",
16
- "@wix/cli-app": "^1.0.0",
17
- "@wix/sdk-types": "^1.0.0",
18
- "react": "16.14.0",
19
- "react-dom": "16.14.0",
20
- "typescript": "~5.8.2"
21
- },
22
- "scripts": {
23
- "wix": "wix",
24
- "build": "wix app build",
25
- "release": "wix app release",
26
- "dev": "wix app dev",
27
- "preview": "wix app preview",
28
- "generate": "wix app generate",
29
- "logs": "wix app logs",
30
- "typecheck": "tsc --noEmit"
31
- }
32
- }
@@ -1,66 +0,0 @@
1
- import { additionalFees } from '@wix/ecom/service-plugins';
2
- import { items } from '@wix/data';
3
-
4
- interface GlobalFeeConfig {
5
- _id: string;
6
- feeAmount: number;
7
- isEnabled: boolean;
8
- }
9
-
10
- additionalFees.provideHandlers({
11
- calculateAdditionalFees: async ({ request, metadata }) => {
12
- try {
13
- // Query the global additional fee configuration
14
- const configResult = await items.query('global-additional-fee-config')
15
- .limit(1)
16
- .find();
17
-
18
- // If no configuration found or fee is disabled, return empty fees
19
- if (!configResult.items.length) {
20
- return {
21
- additionalFees: [],
22
- currency: metadata.currency || 'USD'
23
- };
24
- }
25
-
26
- const config = configResult.items[0] as GlobalFeeConfig;
27
-
28
- // Check if the fee is enabled and has a valid amount
29
- if (!config.isEnabled || !config.feeAmount || config.feeAmount <= 0) {
30
- return {
31
- additionalFees: [],
32
- currency: metadata.currency || 'USD'
33
- };
34
- }
35
-
36
- // Ensure currency matches site currency
37
- const responseCurrency = metadata.currency || 'USD';
38
-
39
- // Convert fee amount to string as required by Wix API
40
- const feeAmountString = config.feeAmount.toString();
41
-
42
- // Create the global additional fee
43
- const globalFee = {
44
- code: 'global-additional-fee',
45
- name: 'Global Additional Fee',
46
- translatedName: 'Global Additional Fee',
47
- price: feeAmountString,
48
- taxDetails: {
49
- taxable: true
50
- }
51
- // No lineItemIds specified - applies to entire cart
52
- };
53
-
54
- return {
55
- additionalFees: [globalFee],
56
- currency: responseCurrency
57
- };
58
-
59
- } catch (error) {
60
- return {
61
- additionalFees: [],
62
- currency: metadata.currency || 'USD'
63
- };
64
- }
65
- },
66
- });
@@ -1,42 +0,0 @@
1
- import { customTriggers } from "@wix/ecom/service-plugins";
2
-
3
- customTriggers.provideHandlers({
4
- getEligibleTriggers: async (payload) => {
5
- const { request, metadata } = payload;
6
- // Use the `request` and `metadata` received from Wix and
7
- // apply custom logic.
8
- return {
9
- // Return your response exactly as documented to integrate with Wix.
10
- // Return value example:
11
- eligibleTriggers: [
12
- {
13
- customTriggerId: "my-happy-hour-trigger",
14
- identifier: "123",
15
- },
16
- {
17
- customTriggerId: "my-digital-sale-trigger",
18
- identifier: "234",
19
- },
20
- ],
21
- };
22
- },
23
- listTriggers: async (payload) => {
24
- const { request, metadata } = payload;
25
- // Use the `request` and `metadata` received from Wix and
26
- // apply custom logic.
27
- return {
28
- // Return your response exactly as documented to integrate with Wix.
29
- // Return value example:
30
- customTriggers: [
31
- {
32
- _id: "my-happy-hour-trigger",
33
- name: "Happy Hour 16:00-18:00",
34
- },
35
- {
36
- _id: "my-digital-sale-trigger",
37
- name: "Digital products discount",
38
- },
39
- ],
40
- };
41
- },
42
- });
@@ -1,38 +0,0 @@
1
- import { giftVouchersProvider } from '@wix/ecom/service-plugins';
2
-
3
- giftVouchersProvider.provideHandlers({
4
- redeem: async (payload) => {
5
- const { request, metadata } = payload;
6
- // Use the `request` and `metadata` received from Wix and
7
- // apply custom logic.
8
- return {
9
- // Return your response exactly as documented to integrate with Wix.
10
- // Return value example:
11
- remainingBalance: 80.00,
12
- currencyCode: metadata.currency || "ILS",
13
- transactionId: "00000000-0000-0000-0000-000000000001",
14
- };
15
- },
16
- _void: async (payload) => {
17
- const { request, metadata } = payload;
18
- // Use the `request` and `metadata` received from Wix and
19
- // apply custom logic.
20
- return {
21
- // Return your response exactly as documented to integrate with Wix.
22
- // Return value example:
23
- remainingBalance: 100.00,
24
- currencyCode: metadata.currency || "ILS",
25
- };
26
- },
27
- getBalance: async (payload) => {
28
- const { request, metadata } = payload;
29
- // Use the `request` and `metadata` received from Wix and
30
- // apply custom logic.
31
- return {
32
- // Return your response exactly as documented to integrate with Wix.
33
- // Return value example:
34
- balance: 100.00,
35
- currencyCode: metadata.currency || "ILS",
36
- };
37
- },
38
- });
@@ -1,34 +0,0 @@
1
- import { shippingRates } from "@wix/ecom/service-plugins";
2
- import { ChargeType } from "@wix/auto_sdk_ecom_shipping-rates";
3
-
4
- shippingRates.provideHandlers({
5
- getShippingRates: async (payload) => {
6
- const { request, metadata } = payload;
7
- // Use the `request` and `metadata` received from Wix and
8
- // apply custom logic.
9
- return {
10
- // Return your response exactly as documented to integrate with Wix.
11
- // Return value example:
12
- shippingRates: [
13
- {
14
- code: "usps-international",
15
- title: "USPS - International",
16
- logistics: {
17
- deliveryTime: "2-5 days",
18
- },
19
- cost: {
20
- price: "15",
21
- currency: metadata.currency || "ILS",
22
- additionalCharges: [
23
- {
24
- price: "10",
25
- type: ChargeType.HANDLING_FEE,
26
- details: "Handling fee of $5 applied for fragile items.",
27
- },
28
- ],
29
- },
30
- },
31
- ],
32
- };
33
- },
34
- });
@@ -1,24 +0,0 @@
1
- import { validations } from "@wix/ecom/service-plugins";
2
-
3
- validations.provideHandlers({
4
- getValidationViolations: async (payload) => {
5
- const { request, metadata } = payload;
6
- // Use the `request` and `metadata` received from Wix and
7
- // apply custom logic.
8
- return {
9
- // Return your response exactly as documented to integrate with Wix.
10
- // Return value example:
11
- violations: [
12
- {
13
- description: "You must purchase at least 100 items.",
14
- severity: validations.Severity.WARNING,
15
- target: {
16
- other: {
17
- name: validations.NameInOther.OTHER_DEFAULT,
18
- },
19
- },
20
- },
21
- ],
22
- };
23
- },
24
- });
@@ -1,4 +0,0 @@
1
- /// <reference types="@wix/cli-app/client" />
2
- /// <reference types="@wix/sdk-types/client" />
3
-
4
- // NOTE: This file should not be edited. This is an auto-generated file.
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "@wix/cli-app/tsconfig.app.json",
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "types": ["react"]
6
- },
7
- "include": ["src"]
8
- }
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "https://dev.wix.com/wix-cli/schemas/wix-config.json",
3
- "appId": "05b5b65d-5071-4821-a13c-ba88cae3bee4",
4
- "projectId": "spis-examples"
5
- }
@@ -1,21 +0,0 @@
1
- # survey-manager
2
-
3
- This project was bootstrapped with [Create Wix App](https://www.npmjs.com/package/@wix/create-app).
4
- Read more about it in the [Wix CLI for Apps
5
- documentation](https://dev.wix.com/docs/build-apps/developer-tools/cli/get-started/about-the-wix-cli-for-apps).
6
-
7
- ## Setup 🔧
8
-
9
- ##### Install dependencies:
10
-
11
- ```console
12
- npm install
13
- ```
14
-
15
- ## Available Scripts
16
-
17
- In the project directory, you can run:
18
-
19
- ```console
20
- npm run dev
21
- ```