{"version":3,"sources":["../../src/ecom-recommendations-v1-recommendation-recommendations.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ListAvailableAlgorithmsRequest = z.object({});\nexport const ListAvailableAlgorithmsResponse = z.object({\n  availableAlgorithms: z\n    .array(\n      z.object({\n        config: z\n          .object({\n            name: z\n              .string()\n              .describe('Algorithm name. This value is not translatable.')\n              .min(1)\n              .max(50)\n              .optional(),\n            description: z\n              .string()\n              .describe(\n                'Algorithm description. This describes how the algorithm works and if it has any limitations regarding site content, number of items in the catalog, site traffic, and so on. This value is not translatable.'\n              )\n              .min(1)\n              .max(500)\n              .optional(),\n            additionalInfo: z\n              .string()\n              .describe(\n                'A supplemental `description`. It can be used to help break up and organize information. You can, for example, display this information as a tooltip or as an additional section that is collapsed by default.'\n              )\n              .min(1)\n              .max(300)\n              .optional()\n              .nullable(),\n            algorithmType: z\n              .enum(['UNSPECIFIED', 'RELATED_ITEMS', 'GLOBAL'])\n              .describe(\n                'Algorithms may have the following types:\\n* `RELATED_ITEMS` - This type of algorithm provides recommendations based on 1 or more other provided items. For example, when an item is added to a cart, the algorithm can suggest other items frequently bought together with that item.\\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.'\n              )\n              .optional(),\n            algorithmId: z\n              .string()\n              .describe(\n                'Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project.'\n              )\n              .regex(\n                /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n                'Must be a valid GUID'\n              )\n              .optional(),\n          })\n          .describe('Algorithm configuration.')\n          .optional(),\n        appId: z\n          .string()\n          .describe(\n            'ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n          )\n          .min(1)\n          .max(36)\n          .optional(),\n        catalogAppIds: z.array(z.string()).min(1).max(100).optional(),\n      })\n    )\n    .max(500)\n    .optional(),\n});\nexport const GetRecommendationRequest = z.object({\n  algorithms: z\n    .array(\n      z.object({\n        _id: z\n          .string()\n          .describe(\n            'ID of the algorithm, as defined by the app that provides it.'\n          )\n          .regex(\n            /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n            'Must be a valid GUID'\n          ),\n        appId: z\n          .string()\n          .describe(\n            'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n          )\n          .min(1)\n          .max(36),\n      })\n    )\n    .min(1)\n    .max(10),\n  options: z\n    .object({\n      items: z\n        .array(\n          z.object({\n            catalogItemId: z\n              .string()\n              .describe('ID of the item within the catalog it belongs to.')\n              .min(1)\n              .max(36),\n            appId: z\n              .string()\n              .describe(\n                'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n              )\n              .min(1),\n            options: z\n              .record(z.string(), z.any())\n              .describe(\n                'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n              )\n              .optional()\n              .nullable(),\n          })\n        )\n        .max(300)\n        .optional(),\n      minimumRecommendedItems: z\n        .number()\n        .int()\n        .describe(\n          'Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned.'\n        )\n        .min(0)\n        .max(100)\n        .optional(),\n    })\n    .describe('Get recommendation options.')\n    .optional(),\n});\nexport const GetRecommendationResponse = z.object({\n  recommendation: z\n    .object({\n      items: z\n        .array(\n          z.object({\n            catalogItemId: z\n              .string()\n              .describe('ID of the item within the catalog it belongs to.')\n              .min(1)\n              .max(36)\n              .optional(),\n            appId: z\n              .string()\n              .describe(\n                'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n              )\n              .min(1)\n              .optional(),\n            options: z\n              .record(z.string(), z.any())\n              .describe(\n                'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n              )\n              .optional()\n              .nullable(),\n          })\n        )\n        .max(100)\n        .optional(),\n      algorithm: z\n        .object({\n          _id: z\n            .string()\n            .describe(\n              'ID of the algorithm, as defined by the app that provides it.'\n            )\n            .regex(\n              /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n              'Must be a valid GUID'\n            )\n            .optional(),\n          appId: z\n            .string()\n            .describe(\n              'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n            )\n            .min(1)\n            .max(36)\n            .optional(),\n        })\n        .describe('The algorithm used to provide the recommendation.')\n        .optional(),\n    })\n    .describe(\n      'The recommended items and the algorithm that provided them. Empty if no algorithm met the `minimumRecommendedItems` threshold.'\n    )\n    .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,iCAAmC,SAAO,CAAC,CAAC;AAClD,IAAM,kCAAoC,SAAO;AAAA,EACtD,qBACG;AAAA,IACG,SAAO;AAAA,MACP,QACG,SAAO;AAAA,QACN,MACG,SAAO,EACP,SAAS,iDAAiD,EAC1D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,aACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,QACZ,gBACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,QACZ,eACG,OAAK,CAAC,eAAe,iBAAiB,QAAQ,CAAC,EAC/C;AAAA,UACC;AAAA,QACF,EACC,SAAS;AAAA,QACZ,aACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC;AAAA,UACC;AAAA,UACA;AAAA,QACF,EACC,SAAS;AAAA,MACd,CAAC,EACA,SAAS,0BAA0B,EACnC,SAAS;AAAA,MACZ,OACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,MACZ,eAAiB,QAAQ,SAAO,CAAC,E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