@legible-sync/example-eda 1.2.0

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 (118) hide show
  1. package/.eslintrc.js +16 -0
  2. package/README.md +103 -0
  3. package/__tests__/integration/ecommerce-flow.test.ts +247 -0
  4. package/__tests__/unit/EventBus.test.ts +154 -0
  5. package/__tests__/unit/PluginManager.test.ts +111 -0
  6. package/__tests__/unit/concepts/User.test.ts +130 -0
  7. package/dist/core/EventBus.d.ts +16 -0
  8. package/dist/core/EventBus.d.ts.map +1 -0
  9. package/dist/core/EventBus.js +44 -0
  10. package/dist/core/EventBus.js.map +1 -0
  11. package/dist/core/PluginManager.d.ts +16 -0
  12. package/dist/core/PluginManager.d.ts.map +1 -0
  13. package/dist/core/PluginManager.js +37 -0
  14. package/dist/core/PluginManager.js.map +1 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +145 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/plugins/analytics/concepts/Analytics.d.ts +3 -0
  20. package/dist/plugins/analytics/concepts/Analytics.d.ts.map +1 -0
  21. package/dist/plugins/analytics/concepts/Analytics.js +43 -0
  22. package/dist/plugins/analytics/concepts/Analytics.js.map +1 -0
  23. package/dist/plugins/analytics/index.d.ts +3 -0
  24. package/dist/plugins/analytics/index.d.ts.map +1 -0
  25. package/dist/plugins/analytics/index.js +16 -0
  26. package/dist/plugins/analytics/index.js.map +1 -0
  27. package/dist/plugins/analytics/syncs/analytics-events.sync.d.ts +3 -0
  28. package/dist/plugins/analytics/syncs/analytics-events.sync.d.ts.map +1 -0
  29. package/dist/plugins/analytics/syncs/analytics-events.sync.js +101 -0
  30. package/dist/plugins/analytics/syncs/analytics-events.sync.js.map +1 -0
  31. package/dist/plugins/inventory/concepts/Inventory.d.ts +3 -0
  32. package/dist/plugins/inventory/concepts/Inventory.d.ts.map +1 -0
  33. package/dist/plugins/inventory/concepts/Inventory.js +60 -0
  34. package/dist/plugins/inventory/concepts/Inventory.js.map +1 -0
  35. package/dist/plugins/inventory/index.d.ts +3 -0
  36. package/dist/plugins/inventory/index.d.ts.map +1 -0
  37. package/dist/plugins/inventory/index.js +15 -0
  38. package/dist/plugins/inventory/index.js.map +1 -0
  39. package/dist/plugins/notifications/concepts/Notification.d.ts +3 -0
  40. package/dist/plugins/notifications/concepts/Notification.d.ts.map +1 -0
  41. package/dist/plugins/notifications/concepts/Notification.js +42 -0
  42. package/dist/plugins/notifications/concepts/Notification.js.map +1 -0
  43. package/dist/plugins/notifications/index.d.ts +3 -0
  44. package/dist/plugins/notifications/index.d.ts.map +1 -0
  45. package/dist/plugins/notifications/index.js +15 -0
  46. package/dist/plugins/notifications/index.js.map +1 -0
  47. package/dist/plugins/orders/concepts/Order.d.ts +3 -0
  48. package/dist/plugins/orders/concepts/Order.d.ts.map +1 -0
  49. package/dist/plugins/orders/concepts/Order.js +98 -0
  50. package/dist/plugins/orders/concepts/Order.js.map +1 -0
  51. package/dist/plugins/orders/index.d.ts +3 -0
  52. package/dist/plugins/orders/index.d.ts.map +1 -0
  53. package/dist/plugins/orders/index.js +16 -0
  54. package/dist/plugins/orders/index.js.map +1 -0
  55. package/dist/plugins/orders/syncs/order-workflow.sync.d.ts +3 -0
  56. package/dist/plugins/orders/syncs/order-workflow.sync.d.ts.map +1 -0
  57. package/dist/plugins/orders/syncs/order-workflow.sync.js +168 -0
  58. package/dist/plugins/orders/syncs/order-workflow.sync.js.map +1 -0
  59. package/dist/plugins/payments/concepts/Payment.d.ts +3 -0
  60. package/dist/plugins/payments/concepts/Payment.d.ts.map +1 -0
  61. package/dist/plugins/payments/concepts/Payment.js +156 -0
  62. package/dist/plugins/payments/concepts/Payment.js.map +1 -0
  63. package/dist/plugins/payments/index.d.ts +3 -0
  64. package/dist/plugins/payments/index.d.ts.map +1 -0
  65. package/dist/plugins/payments/index.js +16 -0
  66. package/dist/plugins/payments/index.js.map +1 -0
  67. package/dist/plugins/payments/syncs/payment-workflow.sync.d.ts +3 -0
  68. package/dist/plugins/payments/syncs/payment-workflow.sync.d.ts.map +1 -0
  69. package/dist/plugins/payments/syncs/payment-workflow.sync.js +264 -0
  70. package/dist/plugins/payments/syncs/payment-workflow.sync.js.map +1 -0
  71. package/dist/plugins/products/concepts/Product.d.ts +3 -0
  72. package/dist/plugins/products/concepts/Product.d.ts.map +1 -0
  73. package/dist/plugins/products/concepts/Product.js +85 -0
  74. package/dist/plugins/products/concepts/Product.js.map +1 -0
  75. package/dist/plugins/products/index.d.ts +3 -0
  76. package/dist/plugins/products/index.d.ts.map +1 -0
  77. package/dist/plugins/products/index.js +16 -0
  78. package/dist/plugins/products/index.js.map +1 -0
  79. package/dist/plugins/products/syncs/product-events.sync.d.ts +3 -0
  80. package/dist/plugins/products/syncs/product-events.sync.d.ts.map +1 -0
  81. package/dist/plugins/products/syncs/product-events.sync.js +77 -0
  82. package/dist/plugins/products/syncs/product-events.sync.js.map +1 -0
  83. package/dist/plugins/users/concepts/User.d.ts +3 -0
  84. package/dist/plugins/users/concepts/User.d.ts.map +1 -0
  85. package/dist/plugins/users/concepts/User.js +81 -0
  86. package/dist/plugins/users/concepts/User.js.map +1 -0
  87. package/dist/plugins/users/index.d.ts +3 -0
  88. package/dist/plugins/users/index.d.ts.map +1 -0
  89. package/dist/plugins/users/index.js +16 -0
  90. package/dist/plugins/users/index.js.map +1 -0
  91. package/dist/plugins/users/syncs/user-events.sync.d.ts +3 -0
  92. package/dist/plugins/users/syncs/user-events.sync.d.ts.map +1 -0
  93. package/dist/plugins/users/syncs/user-events.sync.js +75 -0
  94. package/dist/plugins/users/syncs/user-events.sync.js.map +1 -0
  95. package/package.json +40 -0
  96. package/src/core/EventBus.ts +55 -0
  97. package/src/core/PluginManager.ts +51 -0
  98. package/src/index.ts +169 -0
  99. package/src/plugins/analytics/concepts/Analytics.ts +53 -0
  100. package/src/plugins/analytics/index.ts +15 -0
  101. package/src/plugins/analytics/syncs/analytics-events.sync.ts +103 -0
  102. package/src/plugins/inventory/concepts/Inventory.ts +73 -0
  103. package/src/plugins/inventory/index.ts +14 -0
  104. package/src/plugins/notifications/concepts/Notification.ts +49 -0
  105. package/src/plugins/notifications/index.ts +14 -0
  106. package/src/plugins/orders/concepts/Order.ts +118 -0
  107. package/src/plugins/orders/index.ts +15 -0
  108. package/src/plugins/orders/syncs/order-workflow.sync.ts +173 -0
  109. package/src/plugins/payments/concepts/Payment.ts +186 -0
  110. package/src/plugins/payments/index.ts +15 -0
  111. package/src/plugins/payments/syncs/payment-workflow.sync.ts +274 -0
  112. package/src/plugins/products/concepts/Product.ts +102 -0
  113. package/src/plugins/products/index.ts +15 -0
  114. package/src/plugins/products/syncs/product-events.sync.ts +78 -0
  115. package/src/plugins/users/concepts/User.ts +97 -0
  116. package/src/plugins/users/index.ts +15 -0
  117. package/src/plugins/users/syncs/user-events.sync.ts +76 -0
  118. package/tsconfig.json +9 -0
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Inventory = void 0;
4
+ exports.Inventory = {
5
+ state: {
6
+ stock: new Map(),
7
+ reservations: new Map(),
8
+ },
9
+ async execute(action, input) {
10
+ const state = this.state;
11
+ switch (action) {
12
+ case 'setStock': {
13
+ const { productId, quantity } = input;
14
+ if (!productId || quantity < 0) {
15
+ throw new Error('Valid productId and non-negative quantity required');
16
+ }
17
+ state.stock.set(productId, quantity);
18
+ return { productId, quantity };
19
+ }
20
+ case 'checkAvailability': {
21
+ const { orderId, items } = input;
22
+ let total = 0;
23
+ const unavailable = [];
24
+ for (const item of items) {
25
+ const stock = state.stock.get(item.productId) || 0;
26
+ if (stock < item.quantity) {
27
+ unavailable.push({
28
+ productId: item.productId,
29
+ requested: item.quantity,
30
+ available: stock
31
+ });
32
+ }
33
+ // Calculate total from input items (prices should be provided)
34
+ total += item.quantity * (item.price || 0);
35
+ }
36
+ const available = unavailable.length === 0;
37
+ return { available, total, unavailable };
38
+ }
39
+ case 'deduct': {
40
+ const { orderId, items } = input;
41
+ for (const item of items) {
42
+ const currentStock = state.stock.get(item.productId) || 0;
43
+ if (currentStock < item.quantity) {
44
+ throw new Error(`Insufficient stock for product ${item.productId}`);
45
+ }
46
+ state.stock.set(item.productId, currentStock - item.quantity);
47
+ }
48
+ return { success: true };
49
+ }
50
+ case 'getStock': {
51
+ const { productId } = input;
52
+ const quantity = state.stock.get(productId) || 0;
53
+ return { productId, quantity };
54
+ }
55
+ default:
56
+ throw new Error(`Unknown action: ${action}`);
57
+ }
58
+ }
59
+ };
60
+ //# sourceMappingURL=Inventory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Inventory.js","sourceRoot":"","sources":["../../../../src/plugins/inventory/concepts/Inventory.ts"],"names":[],"mappings":";;;AAGa,QAAA,SAAS,GAAY;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,IAAI,GAAG,EAAkB;QAChC,YAAY,EAAE,IAAI,GAAG,EAAiB;KACvC;IAED,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,KAAU;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;gBAEtC,IAAI,CAAC,SAAS,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;oBAC/B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;gBACxE,CAAC;gBAED,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBACrC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;YACjC,CAAC;YAED,KAAK,mBAAmB,CAAC,CAAC,CAAC;gBACzB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;gBAEjC,IAAI,KAAK,GAAG,CA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I,EAAE,CAAC;YAC3B,CAAC;YAED,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;gBAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;YACjC,CAAC;YAED;gBACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Plugin } from '../../core/PluginManager';
2
+ export declare const inventoryPlugin: Plugin;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/inventory/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,eAAO,MAAM,eAAe,EAAE,MAS7B,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inventoryPlugin = void 0;
4
+ const Inventory_1 = require("./concepts/Inventory");
5
+ exports.inventoryPlugin = {
6
+ name: 'inventory',
7
+ concepts: {
8
+ Inventory: Inventory_1.Inventory
9
+ },
10
+ syncs: [],
11
+ initialize: async (_engine) => {
12
+ console.log('📊 Inventory plugin initialized');
13
+ }
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/inventory/index.ts"],"names":[],"mappings":";;;AAEA,oDAAiD;AAEpC,QAAA,eAAe,GAAW;IACrC,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE;QACR,SAAS,EAAT,qBAAS;KACV;IACD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IACjD,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Concept } from '@legible-sync/core';
2
+ export declare const Notification: Concept;
3
+ //# sourceMappingURL=Notification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../../src/plugins/notifications/concepts/Notification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,OA6C1B,CAAC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Notification = void 0;
4
+ exports.Notification = {
5
+ state: {
6
+ sent: new Map(),
7
+ },
8
+ async execute(action, input) {
9
+ const state = this.state;
10
+ switch (action) {
11
+ case 'send': {
12
+ const { type, to, template, data } = input;
13
+ // Simulate sending notification
14
+ const notificationId = `notif_${Date.now()}`;
15
+ const notification = {
16
+ id: notificationId,
17
+ type,
18
+ to,
19
+ template,
20
+ data,
21
+ sentAt: new Date(),
22
+ status: 'sent'
23
+ };
24
+ // Store sent notifications
25
+ if (!state.sent.has(to)) {
26
+ state.sent.set(to, []);
27
+ }
28
+ state.sent.get(to).push(notification);
29
+ console.log(`📧 ${type.toUpperCase()} sent to ${to}: ${template}`);
30
+ return { notificationId, notification };
31
+ }
32
+ case 'getHistory': {
33
+ const { recipient } = input;
34
+ const history = state.sent.get(recipient) || [];
35
+ return { notifications: history };
36
+ }
37
+ default:
38
+ throw new Error(`Unknown action: ${action}`);
39
+ }
40
+ }
41
+ };
42
+ //# sourceMappingURL=Notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../../src/plugins/notifications/concepts/Notification.ts"],"names":[],"mappings":";;;AAGa,QAAA,YAAY,GAAY;IACnC,KAAK,EAAE;QACL,IAAI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BACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Plugin } from '../../core/PluginManager';
2
+ export declare const notificationsPlugin: Plugin;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/notifications/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,eAAO,MAAM,mBAAmB,EAAE,MASjC,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.notificationsPlugin = void 0;
4
+ const Notification_1 = require("./concepts/Notification");
5
+ exports.notificationsPlugin = {
6
+ name: 'notifications',
7
+ concepts: {
8
+ Notification: Notification_1.Notification
9
+ },
10
+ syncs: [],
11
+ initialize: async (_engine) => {
12
+ console.log('🔔 Notifications plugin initialized');
13
+ }
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/notifications/index.ts"],"names":[],"mappings":";;;AAEA,0DAAuD;AAE1C,QAAA,mBAAmB,GAAW;IACzC,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE;QACR,YAAY,EAAZ,2BAAY;KACb;IACD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACrD,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Concept } from '@legible-sync/core';
2
+ export declare const Order: Concept;
3
+ //# sourceMappingURL=Order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../../../src/plugins/orders/concepts/Order.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,eAAO,MAAM,KAAK,EAAE,OAiHnB,CAAC"}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Order = void 0;
4
+ const uuid_1 = require("uuid");
5
+ exports.Order = {
6
+ state: {
7
+ orders: new Map(),
8
+ orderItems: new Map(),
9
+ },
10
+ async execute(action, input) {
11
+ const state = this.state;
12
+ switch (action) {
13
+ case 'create': {
14
+ const { userId, items } = input;
15
+ // Validation
16
+ if (!userId || !items || !Array.isArray(items) || items.length === 0) {
17
+ throw new Error('User ID and items array are required');
18
+ }
19
+ // Validate items
20
+ for (const item of items) {
21
+ if (!item.productId || !item.quantity || item.quantity <= 0) {
22
+ throw new Error('Each item must have productId and positive quantity');
23
+ }
24
+ }
25
+ // Create order
26
+ const orderId = (0, uuid_1.v4)();
27
+ const order = {
28
+ id: orderId,
29
+ userId,
30
+ status: 'pending',
31
+ total: 0, // Will be calculated after inventory check
32
+ createdAt: new Date(),
33
+ items: items.map((item) => ({
34
+ productId: item.productId,
35
+ quantity: item.quantity,
36
+ price: item.price || 0
37
+ }))
38
+ };
39
+ state.orders.set(orderId, order);
40
+ state.orderItems.set(orderId, order.items);
41
+ return { orderId, order };
42
+ }
43
+ case 'confirm': {
44
+ const { orderId, total } = input;
45
+ const order = state.orders.get(orderId);
46
+ if (!order) {
47
+ throw new Error('Order not found');
48
+ }
49
+ if (order.status !== 'pending') {
50
+ throw new Error('Order is not in pending status');
51
+ }
52
+ order.status = 'confirmed';
53
+ order.total = total;
54
+ order.confirmedAt = new Date();
55
+ state.orders.set(orderId, order);
56
+ return { order };
57
+ }
58
+ case 'cancel': {
59
+ const { orderId } = input;
60
+ const order = state.orders.get(orderId);
61
+ if (!order) {
62
+ throw new Error('Order not found');
63
+ }
64
+ order.status = 'cancelled';
65
+ order.cancelledAt = new Date();
66
+ state.orders.set(orderId, order);
67
+ return { order };
68
+ }
69
+ case 'ship': {
70
+ const { orderId, trackingNumber } = input;
71
+ const order = state.orders.get(orderId);
72
+ if (!order) {
73
+ throw new Error('Order not found');
74
+ }
75
+ if (order.status !== 'confirmed') {
76
+ throw new Error('Order must be confirmed before shipping');
77
+ }
78
+ order.status = 'shipped';
79
+ order.trackingNumber = trackingNumber;
80
+ order.shippedAt = new Date();
81
+ state.orders.set(orderId, order);
82
+ return { order };
83
+ }
84
+ case 'get': {
85
+ const { orderId } = input;
86
+ const order = state.orders.get(orderId);
87
+ if (!order) {
88
+ throw new Error('Order not found');
89
+ }
90
+ const items = state.orderItems.get(orderId) || [];
91
+ return { order: { ...order, items } };
92
+ }
93
+ default:
94
+ throw new Error(`Unknown action: ${action}`);
95
+ }
96
+ }
97
+ };
98
+ //# sourceMappingURL=Order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Order.js","sourceRoot":"","sources":["../../../../src/plugins/orders/concepts/Order.ts"],"names":[],"mappings":";;;AAEA,+BAAoC;AAEvB,QAAA,KAAK,GAAY;IAC5B,KAAK,EAAE;QACL,MAAM,EAAE,IAAI,GAAG,EAAe;QAC9B,UAAU,EAAE,IAAI,GAAG,EAAiB;KACrC;IAED,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,KAAU;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;gBAEhC,aAAa;gBACb,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBACrE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;gBAC1D,CAAC;gBAED,iBAAiB;gBACjB,KAAK,M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AC;gBAED,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;gBACzB,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;gBACtC,KAAK,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;gBAC7B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAEjC,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,CAAC;YAED,KAAK,KAAK,CAAC,CAAC,CAAC;gBACX,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;gBAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACxC,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;gBACrC,CAAC;gBAED,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;gBAClD,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;YACxC,CAAC;YAED;gBACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Plugin } from '../../core/PluginManager';
2
+ export declare const ordersPlugin: Plugin;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/orders/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAIlD,eAAO,MAAM,YAAY,EAAE,MAS1B,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ordersPlugin = void 0;
4
+ const Order_1 = require("./concepts/Order");
5
+ const order_workflow_sync_1 = require("./syncs/order-workflow.sync");
6
+ exports.ordersPlugin = {
7
+ name: 'orders',
8
+ concepts: {
9
+ Order: Order_1.Order
10
+ },
11
+ syncs: order_workflow_sync_1.orderWorkflowSyncs,
12
+ initialize: async (_engine) => {
13
+ console.log('🛒 Orders plugin initialized');
14
+ }
15
+ };
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/orders/index.ts"],"names":[],"mappings":";;;AAEA,4CAAyC;AACzC,qEAAiE;AAEpD,QAAA,YAAY,GAAW;IAClC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR,KAAK,EAAL,aAAK;KACN;IACD,KAAK,EAAE,wCAAkB;IACzB,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC9C,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { SyncRule } from '@legible-sync/core';
2
+ export declare const orderWorkflowSyncs: SyncRule[];
3
+ //# sourceMappingURL=order-workflow.sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-workflow.sync.d.ts","sourceRoot":"","sources":["../../../../src/plugins/orders/syncs/order-workflow.sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EAyKxC,CAAC"}
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.orderWorkflowSyncs = void 0;
4
+ exports.orderWorkflowSyncs = [
5
+ // After order creation, check inventory availability
6
+ {
7
+ name: "CheckInventoryAfterOrderCreation",
8
+ when: [
9
+ {
10
+ concept: "Order",
11
+ action: "create"
12
+ }
13
+ ],
14
+ then: [
15
+ {
16
+ concept: "Inventory",
17
+ action: "checkAvailability",
18
+ input: {
19
+ orderId: "?orderId",
20
+ items: "?order.items"
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ // If inventory is available, confirm the order
26
+ {
27
+ name: "ConfirmOrderIfInventoryAvailable",
28
+ when: [
29
+ {
30
+ concept: "Inventory",
31
+ action: "checkAvailability"
32
+ }
33
+ ],
34
+ where: {
35
+ filter: (bindings) => bindings.available === true
36
+ },
37
+ then: [
38
+ {
39
+ concept: "Order",
40
+ action: "confirm",
41
+ input: {
42
+ orderId: "?orderId",
43
+ total: "?total"
44
+ }
45
+ }
46
+ ]
47
+ },
48
+ // After order confirmation, get user details for notifications
49
+ {
50
+ name: "GetUserDetailsAfterOrderConfirm",
51
+ when: [
52
+ {
53
+ concept: "Order",
54
+ action: "confirm"
55
+ }
56
+ ],
57
+ then: [
58
+ {
59
+ concept: "User",
60
+ action: "get",
61
+ input: {
62
+ userId: "?order.userId"
63
+ }
64
+ }
65
+ ]
66
+ },
67
+ // If inventory is not available, cancel the order
68
+ {
69
+ name: "CancelOrderIfInventoryUnavailable",
70
+ when: [
71
+ {
72
+ concept: "Inventory",
73
+ action: "checkAvailability"
74
+ }
75
+ ],
76
+ where: {
77
+ filter: (bindings) => bindings.available === false
78
+ },
79
+ then: [
80
+ {
81
+ concept: "Order",
82
+ action: "cancel",
83
+ input: {
84
+ orderId: "?orderId"
85
+ }
86
+ }
87
+ ]
88
+ },
89
+ // When order is confirmed, deduct inventory
90
+ {
91
+ name: "DeductInventoryOnOrderConfirm",
92
+ when: [
93
+ {
94
+ concept: "Order",
95
+ action: "confirm"
96
+ }
97
+ ],
98
+ then: [
99
+ {
100
+ concept: "Inventory",
101
+ action: "deduct",
102
+ input: {
103
+ orderId: "?orderId",
104
+ items: "?order.items"
105
+ }
106
+ }
107
+ ]
108
+ },
109
+ // When user details are retrieved after order confirmation, send notification
110
+ {
111
+ name: "SendOrderConfirmationNotification",
112
+ when: [
113
+ {
114
+ concept: "Order",
115
+ action: "confirm"
116
+ },
117
+ {
118
+ concept: "User",
119
+ action: "get"
120
+ }
121
+ ],
122
+ where: {
123
+ filter: (bindings) => bindings.order.userId === bindings.user.id
124
+ },
125
+ then: [
126
+ {
127
+ concept: "Notification",
128
+ action: "send",
129
+ input: {
130
+ type: "email",
131
+ to: "?user.email",
132
+ template: "order-confirmation",
133
+ data: {
134
+ orderId: "?order.id",
135
+ total: "?order.total",
136
+ items: "?order.items"
137
+ }
138
+ }
139
+ }
140
+ ]
141
+ },
142
+ // When order is shipped, send shipping notification
143
+ {
144
+ name: "SendShippingNotification",
145
+ when: [
146
+ {
147
+ concept: "Order",
148
+ action: "ship"
149
+ }
150
+ ],
151
+ then: [
152
+ {
153
+ concept: "Notification",
154
+ action: "send",
155
+ input: {
156
+ type: "email",
157
+ to: "?user.email",
158
+ template: "order-shipped",
159
+ data: {
160
+ orderId: "?orderId",
161
+ trackingNumber: "?order.trackingNumber"
162
+ }
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ ];
168
+ //# sourceMappingURL=order-workflow.sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-workflow.sync.js","sourceRoot":"","sources":["../../../../src/plugins/orders/syncs/order-workflow.sync.ts"],"names":[],"mappings":";;;AAGa,QAAA,kBAAkB,GAAe;IAC5C,qDAAqD;IACrD;QACE,IAAI,EAAE,kCAAkC;QACxC,IAAI,EAAE;YACJ;gBACE,OAAO,EAAE,OAAO;gBAChB,MAAM,EAAE,QAAQ;aACjB;SACF;QACD,IAAI,EAAE;YACJ;gBACE,OAAO,EAAE,WAAW;gBACpB,MAAM,EAAE,mBAAmB;gBAC3B,KAAK,EAAE;oBACL,OAAO,EAAE,UAAU;oBACnB,KAAK,EAAE,cAAc;iBACtB;aACF;SACF;KACF;IAED,+CAA+C;IAC/C;QACE,IAAI,EAAE,kCAAkC;QACxC,IAAI,EAAE;YACJ;gBACE,OAAO,EAAE,WAAW;gBACpB,MAAM,EAAE,mBAAmB;aAC5B;SACF;QACD,KAAK,EAAE;YACL,MAAM,E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YACJ;gBACE,OAAO,EAAE,OAAO;gBAChB,MAAM,EAAE,SAAS;aAClB;YACD;gBACE,OAAO,EAAE,MAAM;gBACf,MAAM,EAAE,KAAK;aACd;SACF;QACD,KAAK,EAAE;YACL,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,EAAE;SACjE;QACD,IAAI,EAAE;YACJ;gBACE,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,EAAE,EAAE,aAAa;oBACjB,QAAQ,EAAE,oBAAoB;oBAC9B,IAAI,EAAE;wBACJ,OAAO,EAAE,WAAW;wBACpB,KAAK,EAAE,cAAc;wBACrB,KAAK,EAAE,cAAc;qBACtB;iBACF;aACF;SACF;KACF;IAED,oDAAoD;IACpD;QACE,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE;YACJ;gBACE,OAAO,EAAE,OAAO;gBAChB,MAAM,EAAE,MAAM;aACf;SACF;QACD,IAAI,EAAE;YACJ;gBACE,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,EAAE,EAAE,aAAa;oBACjB,QAAQ,EAAE,eAAe;oBACzB,IAAI,EAAE;wBACJ,OAAO,EAAE,UAAU;wBACnB,cAAc,EAAE,uBAAuB;qBACxC;iBACF;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Concept } from '@legible-sync/core';
2
+ export declare const Payment: Concept;
3
+ //# sourceMappingURL=Payment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payment.d.ts","sourceRoot":"","sources":["../../../../src/plugins/payments/concepts/Payment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,eAAO,MAAM,OAAO,EAAE,OAqLrB,CAAC"}