@codemind.ec/medusa-plugin-invoice 1.0.1 → 1.0.3

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 (30) hide show
  1. package/.medusa/server/src/admin/index.js +1 -1
  2. package/.medusa/server/src/admin/index.mjs +1 -1
  3. package/.medusa/server/src/api/admin/invoice-config/route.js +26 -0
  4. package/.medusa/server/src/api/admin/invoice-templates/[id]/preview/route.js +119 -0
  5. package/.medusa/server/src/api/admin/invoice-templates/[id]/restore/route.js +21 -0
  6. package/.medusa/server/src/api/admin/invoice-templates/[id]/route.js +31 -0
  7. package/.medusa/server/src/api/admin/invoice-templates/route.js +20 -0
  8. package/.medusa/server/src/api/admin/invoice-templates/validators.js +18 -0
  9. package/.medusa/server/src/api/middlewares.js +36 -0
  10. package/.medusa/server/src/index.js +16 -1
  11. package/.medusa/server/src/modules/invoice-generator/errors.js +30 -0
  12. package/.medusa/server/src/modules/invoice-generator/index.js +15 -0
  13. package/.medusa/server/src/modules/invoice-generator/loaders/create-default-config.js +45 -0
  14. package/.medusa/server/src/modules/invoice-generator/migrations/Migration20250728094738.js +18 -0
  15. package/.medusa/server/src/modules/invoice-generator/migrations/Migration20250728124134.js +14 -0
  16. package/.medusa/server/src/modules/invoice-generator/migrations/Migration20250728151454.js +14 -0
  17. package/.medusa/server/src/modules/invoice-generator/migrations/Migration20260120005559.js +14 -0
  18. package/.medusa/server/src/modules/invoice-generator/migrations/Migration20260216191700.js +14 -0
  19. package/.medusa/server/src/modules/invoice-generator/migrations/Migration20260601120000.js +17 -0
  20. package/.medusa/server/src/modules/invoice-generator/models/invoice-config.js +16 -0
  21. package/.medusa/server/src/modules/invoice-generator/models/invoice-template.js +19 -0
  22. package/.medusa/server/src/modules/invoice-generator/models/invoice.js +17 -0
  23. package/.medusa/server/src/modules/invoice-generator/service.js +84 -0
  24. package/.medusa/server/src/modules/invoice-generator/templates/defaults/index.js +380 -0
  25. package/.medusa/server/src/modules/invoice-generator/templates/order-invoice.js +348 -0
  26. package/.medusa/server/src/modules/invoice-generator/templates/quote-proforma.js +468 -0
  27. package/.medusa/server/src/modules/invoice-generator/templates/strategy.js +110 -0
  28. package/README.md +134 -43
  29. package/index.d.ts +138 -0
  30. package/package.json +91 -70
package/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # @codemind.ec/medusa-plugin-invoice
2
2
 
3
- Invoice & quotation **PDF widget** for the Medusa v2 admin dashboard download order receipts and manage company billing configuration.
3
+ Plugin de **facturación y cotización PDF** para Medusa v2 genera facturas de pedido y proformas de cotización con plantillas HTML personalizables desde el admin.
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/@codemind.ec/medusa-plugin-invoice.svg)](https://www.npmjs.com/package/@codemind.ec/medusa-plugin-invoice)
6
5
  [![Medusa v2](https://img.shields.io/badge/medusa-v2-blueviolet)](https://docs.medusajs.com)
7
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
7
 
@@ -10,35 +9,35 @@ Invoice & quotation **PDF widget** for the Medusa v2 admin dashboard — downloa
10
9
 
11
10
  ## Features
12
11
 
13
- - **Order invoice widget** — "Download Receipt" button injected into the order detail sidebar in the Medusa admin.
14
- - **PDF generation** — fetches and downloads invoices as PDF files (`comprobante-pedido-{orderId}.pdf`).
15
- - **Invoice config page** — admin route for managing billing/invoicing settings.
16
- - **Medusa SDK integration** — uses the official `@medusajs/js-sdk` for authenticated API calls.
12
+ - **Generación de PDFs** — facturas de pedido y proformas de cotización vía pdfmake + Handlebars.
13
+ - **Plantillas HTML editables** — CRUD completo de plantillas con preview en tiempo real desde el admin.
14
+ - **Configuración de empresa** — logo, RUC, dirección, teléfono, notas de pie de factura.
15
+ - **Strategy Pattern** — cada tipo de documento (factura, proforma) tiene su propia estrategia extensible.
16
+ - **Templates embebidos** — plantillas por defecto incluidas en el código; restaurables con un clic.
17
+ - **Admin UI** — widget de descarga en pedidos, editor de plantillas con CodeMirror, página de configuración.
17
18
 
18
19
  ---
19
20
 
20
- ## Prerequisites
21
+ ## Requisitos
21
22
 
22
- | Requirement | Version |
23
- |-------------|---------|
24
- | Node.js | >= 20 |
25
- | Medusa | >= 2.4.0 |
23
+ | Requisito | Versión |
24
+ |-----------|----------|
25
+ | Node.js | >= 20 |
26
+ | Medusa | >= 2.13 |
26
27
 
27
28
  ---
28
29
 
29
- ## Installation
30
+ ## Instalación
30
31
 
31
32
  ```bash
32
- npm install @codemind.ec/medusa-plugin-invoice
33
- # or
34
33
  pnpm add @codemind.ec/medusa-plugin-invoice
35
34
  ```
36
35
 
37
36
  ---
38
37
 
39
- ## Configuration
38
+ ## Configuración
40
39
 
41
- Add the plugin to your `medusa-config.ts`:
40
+ ### 1. Registrar el plugin y módulo en `medusa-config.ts`
42
41
 
43
42
  ```typescript
44
43
  import { defineConfig } from "@medusajs/framework/utils"
@@ -51,63 +50,155 @@ export default defineConfig({
51
50
  options: {},
52
51
  },
53
52
  ],
53
+ modules: [
54
+ {
55
+ resolve: "@codemind.ec/medusa-plugin-invoice/modules/invoice-generator",
56
+ options: {},
57
+ },
58
+ ],
54
59
  })
55
60
  ```
56
61
 
57
- No environment variables are required. The admin widget uses `VITE_BACKEND_URL` if set, otherwise defaults to `"/"`.
62
+ ### 2. Variables de entorno (opcionales)
58
63
 
59
- ---
64
+ El loader del módulo puede leer estas variables para configurar los valores iniciales de la empresa al crear la base de datos por primera vez:
60
65
 
61
- ## Admin UI
66
+ | Variable | Descripción | Default |
67
+ |-----------------------|------------------------------------|----------------|
68
+ | `STORE_NAME` | Nombre de la empresa | — |
69
+ | `STORE_ADDRESS` | Dirección de la empresa | — |
70
+ | `STORE_PHONE` | Teléfono de la empresa | — |
71
+ | `ADMIN_EMAIL` | Email de notificaciones admin | — |
72
+ | `MEDUSA_BACKEND_URL` | URL base para embeber imágenes | `http://localhost:9000` |
62
73
 
63
- ### Order Invoice Widget
74
+ Todos los valores se pueden editar después desde el admin.
64
75
 
65
- **Zone:** `order.details.side.before`
76
+ ---
66
77
 
67
- When viewing an order in the Medusa admin, a widget appears in the sidebar with a **"Descargar Comprobante"** (Download Receipt) button. Clicking it:
78
+ ## Arquitectura
68
79
 
69
- 1. Calls `GET /admin/orders/{orderId}/invoices`
70
- 2. Downloads the response as a PDF file
71
- 3. Filename: `comprobante-pedido-{orderId}.pdf`
80
+ ```
81
+ medusa-plugin-invoice/
82
+ ├── src/
83
+ │ ├── admin/ # UI del admin (widgets + rutas)
84
+ │ │ ├── widgets/order-invoice.tsx # Botón "Descargar comprobante" en pedidos
85
+ │ │ └── routes/ # Páginas de config y plantillas
86
+ │ ├── api/ # Rutas REST del plugin
87
+ │ │ └── admin/
88
+ │ │ ├── invoice-config/ # GET/POST configuración de empresa
89
+ │ │ └── invoice-templates/ # CRUD de plantillas + preview + restore
90
+ │ └── modules/
91
+ │ └── invoice-generator/
92
+ │ ├── models/ # Invoice, InvoiceConfig, InvoiceTemplate
93
+ │ ├── templates/
94
+ │ │ ├── strategy.ts # BaseDocumentStrategy + TemplateFactory
95
+ │ │ ├── order-invoice.ts # Estrategia de factura de pedido
96
+ │ │ ├── quote-proforma.ts # Estrategia de proforma de cotización
97
+ │ │ └── defaults/index.ts # HTML embebido de plantillas por defecto
98
+ │ ├── loaders/ # Seed de config y plantillas iniciales
99
+ │ ├── migrations/ # Migraciones de base de datos
100
+ │ ├── service.ts # InvoiceGeneratorService
101
+ │ └── index.ts # INVOICE_MODULE export
102
+ └── index.d.ts # Declaraciones de tipos
103
+ ```
72
104
 
73
- ### Invoice Configuration Page
105
+ ### Separación de responsabilidades
74
106
 
75
- **Route:** `/invoice-config`
107
+ | Capa | Ubicación | Responsabilidad |
108
+ |------|-----------|-----------------|
109
+ | **Módulo** (modelos, servicio, migraciones, loader) | Plugin | Datos y lógica de dominio aislada |
110
+ | **API routes** | Plugin | Endpoints CRUD del módulo (config, plantillas) |
111
+ | **Admin UI** | Plugin | Widgets y páginas de administración |
112
+ | **Workflows / Steps** | App (`apps/medusa/`) | Orquestación cross-module |
113
+ | **Subscribers** | App (`apps/medusa/`) | Reacción a eventos del sistema |
76
114
 
77
- A dedicated admin page for managing company billing and invoicing settings.
115
+ > **¿Por qué los workflows NO están en el plugin?**
116
+ >
117
+ > Los workflows son **orquestación cross-module** por naturaleza. Por ejemplo, `generate-invoice-pdf` consulta el módulo `order` (via query graph), resuelve países del módulo `country`, verifica metadata de cotizaciones desde tipos de la app, y *luego* llama al módulo invoice. Moverlos al plugin crearía dependencias circulares (plugin → app) y eliminaría la capacidad de la app de personalizar la orquestación. Esta es la convención recomendada por Medusa v2: los plugins exponen módulos + API, las apps controlan la orquestación.
78
118
 
79
119
  ---
80
120
 
81
- ## Architecture
121
+ ## API Routes
122
+
123
+ ### Invoice Config
82
124
 
83
- This is an **admin-only** plugin it does not register backend modules, API routes, or database models. It provides:
125
+ | Método | Ruta | Descripción |
126
+ |--------|------|-------------|
127
+ | `GET` | `/admin/invoice-config` | Obtener configuración actual |
128
+ | `POST` | `/admin/invoice-config` | Actualizar configuración |
84
129
 
85
- | Component | Location | Purpose |
86
- |-----------|----------|---------|
87
- | Order widget | `widgets/order-invoice.tsx` | PDF download button in order sidebar |
88
- | Config page | `routes/invoice-config/page.tsx` | Billing configuration UI |
89
- | SDK client | `lib/sdk.ts` | Authenticated Medusa client for API calls |
130
+ ### Invoice Templates
90
131
 
91
- The PDF generation endpoint (`/admin/orders/:id/invoices`) should be provided by your Medusa backend (e.g., via a custom API route or another plugin).
132
+ | Método | Ruta | Descripción |
133
+ |--------|------|-------------|
134
+ | `GET` | `/admin/invoice-templates` | Listar plantillas |
135
+ | `POST` | `/admin/invoice-templates` | Crear plantilla |
136
+ | `GET` | `/admin/invoice-templates/:id` | Obtener plantilla |
137
+ | `POST` | `/admin/invoice-templates/:id` | Actualizar plantilla |
138
+ | `DELETE` | `/admin/invoice-templates/:id` | Eliminar plantilla (no defaults) |
139
+ | `POST` | `/admin/invoice-templates/:id/preview` | Generar PDF de preview |
140
+ | `POST` | `/admin/invoice-templates/:id/restore` | Restaurar HTML por defecto |
92
141
 
93
142
  ---
94
143
 
95
- ## SDK Configuration
144
+ ## Uso desde la app
96
145
 
97
- The built-in SDK client is pre-configured for the admin:
146
+ ### Imports disponibles
98
147
 
99
148
  ```typescript
100
- import Medusa from "@medusajs/js-sdk"
149
+ // Módulo y servicio
150
+ import { INVOICE_MODULE, InvoiceGeneratorService } from "@codemind.ec/medusa-plugin-invoice"
151
+
152
+ // Tipos de factura de pedido
153
+ import type { InvoiceOrder, InvoiceLineItem, InvoiceOrderAddress, OrderInvoiceInput } from "@codemind.ec/medusa-plugin-invoice"
154
+
155
+ // Tipos de proforma de cotización
156
+ import type { QuoteProformaInput, ProformaConfigField, QuoteCustomerInfo, QuoteScheduleRules } from "@codemind.ec/medusa-plugin-invoice"
157
+
158
+ // Enums
159
+ import { InvoiceStatus, TemplateType } from "@codemind.ec/medusa-plugin-invoice"
160
+ ```
161
+
162
+ ### Generar un PDF desde un workflow/step
101
163
 
102
- const sdk = new Medusa({
103
- baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
104
- debug: import.meta.env.DEV,
105
- auth: { type: "session" },
164
+ ```typescript
165
+ const invoiceService = container.resolve<InvoiceGeneratorService>(INVOICE_MODULE)
166
+
167
+ // Factura de pedido
168
+ const pdfBuffer = await invoiceService.generatePdf({
169
+ template: "order_invoice",
170
+ data: { order, items, invoiceDisplayId: 1, created_at: "2025-01-01" },
171
+ invoice_id: "inv_01ABC...",
172
+ })
173
+
174
+ // Proforma de cotización
175
+ const pdfBuffer = await invoiceService.generatePdf({
176
+ template: "quote_proforma",
177
+ data: { serviceType: "Catering", /* ... */ },
106
178
  })
107
179
  ```
108
180
 
109
181
  ---
110
182
 
183
+ ## Extensibilidad
184
+
185
+ ### Registrar una nueva estrategia de documento
186
+
187
+ ```typescript
188
+ import { TemplateFactory, BaseDocumentStrategy } from "@codemind.ec/medusa-plugin-invoice"
189
+
190
+ class MyCustomStrategy extends BaseDocumentStrategy<MyInput> {
191
+ async buildDocumentDefinition(input, config, htmlTemplate?) {
192
+ if (htmlTemplate) return this.renderHtmlTemplate(htmlTemplate, input)
193
+ // ... construir doc pdfmake programáticamente
194
+ }
195
+ }
196
+
197
+ TemplateFactory.register("my_custom_doc", MyCustomStrategy)
198
+ ```
199
+
200
+ ---
201
+
111
202
  ## License
112
203
 
113
204
  MIT — [CodeMind](https://codemind.ec)
package/index.d.ts ADDED
@@ -0,0 +1,138 @@
1
+ declare module "@codemind.ec/medusa-plugin-invoice" {
2
+ export const INVOICE_MODULE: "invoiceGenerator"
3
+
4
+ export enum InvoiceStatus {
5
+ LATEST = "latest",
6
+ STALE = "stale",
7
+ }
8
+
9
+ export enum TemplateType {
10
+ ORDER_INVOICE = "order_invoice",
11
+ QUOTE_PROFORMA = "quote_proforma",
12
+ }
13
+
14
+ export interface InvoiceOrderAddress {
15
+ first_name?: string | null
16
+ last_name?: string | null
17
+ address_1?: string | null
18
+ address_2?: string | null
19
+ city?: string | null
20
+ province?: string | null
21
+ postal_code?: string | null
22
+ country_code?: string | null
23
+ phone?: string | null
24
+ metadata?: Record<string, unknown> | null
25
+ }
26
+
27
+ export interface InvoiceLineItem {
28
+ id: string
29
+ title: string
30
+ quantity: number
31
+ unit_price: number
32
+ subtotal?: number | null
33
+ variant_title?: string | null
34
+ variant?: { title?: string | null; product?: { title?: string | null } | null } | null
35
+ metadata?: Record<string, unknown> | null
36
+ }
37
+
38
+ export interface InvoiceOrder {
39
+ id: string
40
+ display_id?: number | null
41
+ email?: string | null
42
+ created_at: string | Date
43
+ currency_code?: string | null
44
+ total?: number | null
45
+ subtotal?: number | null
46
+ tax_total?: number | null
47
+ discount_total?: number | null
48
+ shipping_address?: InvoiceOrderAddress | null
49
+ billing_address?: InvoiceOrderAddress | null
50
+ shipping_methods?: Array<{ name?: string | null; amount?: number | null; shipping_option_id?: string | null }> | null
51
+ items?: InvoiceLineItem[] | null
52
+ metadata?: Record<string, unknown> | null
53
+ }
54
+
55
+ export interface OrderInvoiceInput {
56
+ order: InvoiceOrder
57
+ items: InvoiceLineItem[]
58
+ invoiceDisplayId: number
59
+ created_at: string
60
+ }
61
+
62
+ export interface ProformaConfigField {
63
+ label: string
64
+ value: string
65
+ }
66
+
67
+ export interface ProformaLineItem {
68
+ label: string
69
+ total: number
70
+ }
71
+
72
+ export interface QuoteCustomerInfo {
73
+ name: string
74
+ email: string
75
+ phone: string
76
+ cedula?: string
77
+ eventDate: string
78
+ eventTime: string
79
+ province?: string
80
+ city?: string
81
+ address?: string
82
+ addressDetails?: string
83
+ }
84
+
85
+ export interface QuoteScheduleRules {
86
+ minAdvanceDays: number
87
+ maxAdvanceDays: number
88
+ minEventTime: string
89
+ maxEventTime: string
90
+ }
91
+
92
+ export interface QuoteProformaInput {
93
+ serviceType: string
94
+ scheduleRules: QuoteScheduleRules
95
+ serviceName: string
96
+ configFields: ProformaConfigField[]
97
+ breakdown: ProformaLineItem[]
98
+ includes: string[]
99
+ customerInfo: QuoteCustomerInfo | null
100
+ totals: {
101
+ subtotal: number
102
+ extras: number
103
+ shipping?: number
104
+ discount?: number
105
+ taxes?: number
106
+ total: number
107
+ }
108
+ dateStr: string
109
+ quoteNumber: string
110
+ isHomeDelivery?: boolean
111
+ }
112
+
113
+ export type GeneratePdfParams =
114
+ | { template: "order_invoice"; data: OrderInvoiceInput }
115
+ | { template: "quote_proforma"; data: QuoteProformaInput }
116
+
117
+ export class InvoiceGeneratorService {
118
+ generatePdf(params: GeneratePdfParams & { invoice_id?: string }): Promise<Buffer>
119
+ listInvoiceConfigs(filters?: Record<string, unknown>): Promise<any[]>
120
+ updateInvoiceConfigs(data: Record<string, unknown>): Promise<any>
121
+ retrieveInvoiceConfig(id: string): Promise<any>
122
+ listInvoices(filters?: Record<string, unknown>): Promise<any[]>
123
+ updateInvoices(data: any): Promise<any>
124
+ createInvoices(data: Record<string, unknown>): Promise<any>
125
+ deleteInvoices(id: string): Promise<void>
126
+ retrieveInvoice(id: string): Promise<any>
127
+ listInvoiceTemplates(filters?: Record<string, unknown>): Promise<any[]>
128
+ createInvoiceTemplates(data: Record<string, unknown>): Promise<any>
129
+ updateInvoiceTemplates(data: Record<string, unknown>): Promise<any>
130
+ deleteInvoiceTemplates(id: string): Promise<void>
131
+ retrieveInvoiceTemplate(id: string): Promise<any>
132
+ }
133
+ }
134
+
135
+ declare module "@codemind.ec/medusa-plugin-invoice/modules/invoice-generator" {
136
+ export const INVOICE_MODULE: "invoiceGenerator"
137
+ export default object
138
+ }
package/package.json CHANGED
@@ -1,72 +1,93 @@
1
1
  {
2
- "name": "@codemind.ec/medusa-plugin-invoice",
3
- "version": "1.0.1",
4
- "description": "Invoice & quotation PDF widget for Medusa v2 admin — download order receipts and manage company billing config.",
5
- "author": "Kollor <dev@codemind.ec> (https://codemind.ec)",
6
- "license": "MIT",
7
- "files": [
8
- ".medusa/server"
9
- ],
10
- "exports": {
11
- "./package.json": "./package.json",
12
- "./admin": {
13
- "import": "./.medusa/server/src/admin/index.mjs",
14
- "require": "./.medusa/server/src/admin/index.js",
15
- "default": "./.medusa/server/src/admin/index.js"
2
+ "name": "@codemind.ec/medusa-plugin-invoice",
3
+ "version": "1.0.3",
4
+ "description": "Invoice & quotation PDF widget for Medusa v2 admin — download order receipts and manage company billing config.",
5
+ "author": "Kollor <dev@codemind.ec> (https://codemind.ec)",
6
+ "license": "MIT",
7
+ "files": [
8
+ ".medusa/server",
9
+ "index.d.ts"
10
+ ],
11
+ "types": "./index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./index.d.ts",
15
+ "default": "./.medusa/server/src/index.js"
16
+ },
17
+ "./package.json": "./package.json",
18
+ "./modules/invoice-generator": {
19
+ "types": "./index.d.ts",
20
+ "default": "./.medusa/server/src/modules/invoice-generator/index.js"
21
+ },
22
+ "./modules/*": "./.medusa/server/src/modules/*/index.js",
23
+ "./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
24
+ "./admin": {
25
+ "import": "./.medusa/server/src/admin/index.mjs",
26
+ "require": "./.medusa/server/src/admin/index.js",
27
+ "default": "./.medusa/server/src/admin/index.js"
28
+ }
29
+ },
30
+ "keywords": [
31
+ "medusa",
32
+ "medusa-plugin",
33
+ "medusa-v2",
34
+ "plugin",
35
+ "invoice",
36
+ "pdf",
37
+ "comprobante",
38
+ "codemind",
39
+ "kollor"
40
+ ],
41
+ "scripts": {
42
+ "build": "medusa plugin:build",
43
+ "dev": "medusa plugin:develop",
44
+ "prepublishOnly": "medusa plugin:build"
45
+ },
46
+ "devDependencies": {
47
+ "@codemirror/lang-html": "^6.4.11",
48
+ "@codemirror/theme-one-dark": "^6.1.3",
49
+ "@medusajs/admin-sdk": "2.13.3",
50
+ "@medusajs/admin-shared": "2.13.3",
51
+ "@medusajs/cli": "2.13.3",
52
+ "@medusajs/framework": "2.13.3",
53
+ "@medusajs/icons": "^2.13.3",
54
+ "@medusajs/js-sdk": "^2.13.3",
55
+ "@medusajs/medusa": "2.13.3",
56
+ "@medusajs/test-utils": "2.13.3",
57
+ "@medusajs/ui": "^4.1.3",
58
+ "@swc/core": "^1.7.28",
59
+ "@tanstack/react-query": "^5.64.2",
60
+ "@types/jsdom": "^28.0.1",
61
+ "@types/node": "^20",
62
+ "@types/pdfmake": "^0.2.11",
63
+ "@types/react": "^18.3.3",
64
+ "@types/react-dom": "^18.3.0",
65
+ "@uiw/react-codemirror": "^4.25.8",
66
+ "handlebars": "^4.7.8",
67
+ "prop-types": "^15.8.1",
68
+ "react": "^18.3.1",
69
+ "react-dom": "^18.3.1",
70
+ "react-hook-form": "^7.54.2",
71
+ "ts-node": "^10.9.2",
72
+ "typescript": "^5",
73
+ "vite": "^5.4.14"
74
+ },
75
+ "dependencies": {
76
+ "axios": "^1.7.7",
77
+ "html-to-pdfmake": "^2.5.33",
78
+ "jsdom": "^29.0.1",
79
+ "pdfmake": "^0.2.20"
80
+ },
81
+ "peerDependencies": {
82
+ "@medusajs/admin-sdk": "2.13.3",
83
+ "@medusajs/cli": "2.13.3",
84
+ "@medusajs/framework": "2.13.3",
85
+ "@medusajs/icons": "^2.13.3",
86
+ "@medusajs/medusa": "2.13.3",
87
+ "@medusajs/test-utils": "2.13.3",
88
+ "@medusajs/ui": "^4.1.3"
89
+ },
90
+ "engines": {
91
+ "node": ">=20"
16
92
  }
17
- },
18
- "keywords": [
19
- "medusa",
20
- "medusa-plugin",
21
- "medusa-v2",
22
- "plugin",
23
- "invoice",
24
- "pdf",
25
- "comprobante",
26
- "codemind",
27
- "kollor"
28
- ],
29
- "devDependencies": {
30
- "@codemirror/lang-html": "^6.4.11",
31
- "@codemirror/theme-one-dark": "^6.1.3",
32
- "@medusajs/admin-sdk": "2.13.3",
33
- "@medusajs/admin-shared": "2.13.3",
34
- "@medusajs/cli": "2.13.3",
35
- "@medusajs/framework": "2.13.3",
36
- "@medusajs/icons": "^2.13.3",
37
- "@medusajs/js-sdk": "^2.13.3",
38
- "@medusajs/medusa": "2.13.3",
39
- "@medusajs/test-utils": "2.13.3",
40
- "@medusajs/ui": "^4.1.3",
41
- "@swc/core": "^1.7.28",
42
- "@tanstack/react-query": "^5.64.2",
43
- "@types/node": "^20",
44
- "@types/react": "^18.3.3",
45
- "@types/react-dom": "^18.3.0",
46
- "@uiw/react-codemirror": "^4.25.8",
47
- "handlebars": "^4.7.8",
48
- "prop-types": "^15.8.1",
49
- "react": "^18.3.1",
50
- "react-dom": "^18.3.1",
51
- "react-hook-form": "^7.54.2",
52
- "ts-node": "^10.9.2",
53
- "typescript": "^5",
54
- "vite": "^5.4.14"
55
- },
56
- "peerDependencies": {
57
- "@medusajs/admin-sdk": "2.13.3",
58
- "@medusajs/cli": "2.13.3",
59
- "@medusajs/framework": "2.13.3",
60
- "@medusajs/icons": "^2.13.3",
61
- "@medusajs/medusa": "2.13.3",
62
- "@medusajs/test-utils": "2.13.3",
63
- "@medusajs/ui": "^4.1.3"
64
- },
65
- "engines": {
66
- "node": ">=20"
67
- },
68
- "scripts": {
69
- "build": "medusa plugin:build",
70
- "dev": "medusa plugin:develop"
71
- }
72
- }
93
+ }