@aglyn/plugins-commerce 1.0.0-beta.268 → 1.0.0-beta.270

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 (35) hide show
  1. package/package.json +13 -13
  2. package/src/lib/components/console/payment-methods-card.component.js +7 -0
  3. package/src/lib/components/console/payment-methods-card.component.js.map +1 -1
  4. package/src/lib/components/console/payments-settings-card.component.d.ts +2 -0
  5. package/src/lib/components/console/payments-settings-card.component.js +2 -0
  6. package/src/lib/components/console/payments-settings-card.component.js.map +1 -1
  7. package/src/lib/components/console/pos/pos-kiosk-readiness.component.d.ts +58 -0
  8. package/src/lib/components/console/pos/pos-kiosk-readiness.component.js +146 -0
  9. package/src/lib/components/console/pos/pos-kiosk-readiness.component.js.map +1 -0
  10. package/src/lib/components/console/pos/pos-pairing.component.d.ts +12 -2
  11. package/src/lib/components/console/pos/pos-pairing.component.js +14 -1
  12. package/src/lib/components/console/pos/pos-pairing.component.js.map +1 -1
  13. package/src/lib/components/console/pos-devices-card.component.js +13 -0
  14. package/src/lib/components/console/pos-devices-card.component.js.map +1 -1
  15. package/src/lib/contracts.d.ts +237 -0
  16. package/src/lib/contracts.js +46 -0
  17. package/src/lib/contracts.js.map +1 -0
  18. package/src/lib/declarations.console-server.js +8 -0
  19. package/src/lib/declarations.console-server.js.map +1 -1
  20. package/src/lib/model/commerce-record-routes.d.ts +7 -0
  21. package/src/lib/model/commerce-record-routes.js +7 -0
  22. package/src/lib/model/commerce-record-routes.js.map +1 -1
  23. package/src/lib/model/commerce-server-search-sources.d.ts +30 -0
  24. package/src/lib/model/commerce-server-search-sources.js +57 -0
  25. package/src/lib/model/commerce-server-search-sources.js.map +1 -0
  26. package/src/lib/model/order-events.d.ts +8 -127
  27. package/src/lib/model/order-events.js +11 -24
  28. package/src/lib/model/order-events.js.map +1 -1
  29. package/src/lib/model/order-history.d.ts +7 -40
  30. package/src/lib/model/order-history.js +7 -5
  31. package/src/lib/model/order-history.js.map +1 -1
  32. package/src/lib/native-nav.d.ts +30 -0
  33. package/src/lib/native-nav.js +127 -0
  34. package/src/lib/native-nav.js.map +1 -0
  35. package/src/lib/server/order-event-triggers.d.ts +2 -2
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { type NativeNavContribution, type NativeNavCreateContribution, type NativeNavElsewhere } from '@aglyn/aglyn/app-utils/native-nav';
18
+ /**
19
+ * Orders and Products in the native apps' navigation (AGL-3943): the rows this plugin
20
+ * adds to the manifest the shells draw, placed into the core's lists by
21
+ * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the
22
+ * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.
23
+ *
24
+ * Imports only the core's plain nav module, so the native contracts read it.
25
+ */
26
+ export declare const NATIVE_NAV_ROWS: readonly NativeNavContribution[];
27
+ /** The console's POS tab is the register app's, not a row of this one. */
28
+ export declare const NATIVE_NAV_ELSEWHERE: readonly NativeNavElsewhere[];
29
+ /** A product ("Add product" on Catalog) and a draft order ("Draft order" on Orders). */
30
+ export declare const NATIVE_NAV_CREATE: readonly NativeNavCreateContribution[];
@@ -0,0 +1,127 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { nativeNavHubSection, nativeNavIcon, nativeNavRef } from "@aglyn/aglyn/app-utils/native-nav";
17
+ /**
18
+ * Orders and Products in the native apps' navigation (AGL-3943): the rows this plugin
19
+ * adds to the manifest the shells draw, placed into the core's lists by
20
+ * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the
21
+ * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.
22
+ *
23
+ * Imports only the core's plain nav module, so the native contracts read it.
24
+ */ export const NATIVE_NAV_ROWS = [
25
+ {
26
+ list: 'site',
27
+ group: 'sell',
28
+ row: {
29
+ id: 'orders',
30
+ label: 'Orders',
31
+ icon: nativeNavIcon('bag', 'shopping_basket'),
32
+ screen: 'commerce.orders',
33
+ pluginId: 'commerce',
34
+ order: 10,
35
+ sections: [
36
+ nativeNavHubSection('host', '/products', 'orders', 'Orders', 'commerce.orders'),
37
+ nativeNavHubSection('host', '/products', 'returns', 'Returns', 'commerce.returns'),
38
+ nativeNavHubSection('host', '/products', 'reservations', 'Reservations', 'commerce.reservations')
39
+ ],
40
+ docs: '/commerce-and-bookings/commerce/overview',
41
+ console: nativeNavRef('hostPluginSection', '/products/orders')
42
+ }
43
+ },
44
+ {
45
+ list: 'site',
46
+ group: 'sell',
47
+ row: {
48
+ id: 'products',
49
+ label: 'Products',
50
+ icon: nativeNavIcon('tag', 'sell'),
51
+ screen: 'commerce.products',
52
+ pluginId: 'commerce',
53
+ order: 20,
54
+ keywords: [
55
+ 'catalog',
56
+ 'stock',
57
+ 'inventory'
58
+ ],
59
+ sections: [
60
+ nativeNavHubSection('host', '/products', 'catalog', 'Catalog', 'commerce.products'),
61
+ nativeNavHubSection('host', '/products', 'promotions', 'Promotions', 'commerce.promotions'),
62
+ nativeNavHubSection('host', '/products', 'analytics', 'Analytics', 'commerce.sales')
63
+ ],
64
+ actions: [
65
+ {
66
+ id: 'scan',
67
+ label: 'Scan stock',
68
+ icon: nativeNavIcon('barcode.viewfinder', 'qr_code_scanner'),
69
+ screen: 'commerce.scan'
70
+ },
71
+ {
72
+ id: 'newProduct',
73
+ label: 'New product',
74
+ icon: nativeNavIcon('plus', 'add'),
75
+ screen: 'commerce.product',
76
+ params: {
77
+ new: '1'
78
+ }
79
+ }
80
+ ],
81
+ docs: '/commerce-and-bookings/commerce/overview',
82
+ console: nativeNavRef('hostPluginTab', '/products')
83
+ }
84
+ }
85
+ ];
86
+ /** The console's POS tab is the register app's, not a row of this one. */ export const NATIVE_NAV_ELSEWHERE = [
87
+ {
88
+ console: nativeNavRef('hostPluginTab', '/pos'),
89
+ where: 'The POS app'
90
+ }
91
+ ];
92
+ /** A product ("Add product" on Catalog) and a draft order ("Draft order" on Orders). */ export const NATIVE_NAV_CREATE = [
93
+ {
94
+ scope: 'site',
95
+ item: {
96
+ id: 'product',
97
+ label: 'Product',
98
+ icon: nativeNavIcon('tag', 'sell'),
99
+ screen: 'commerce.product',
100
+ params: {
101
+ new: '1'
102
+ },
103
+ pluginId: 'commerce',
104
+ planFeature: 'commerce',
105
+ order: 20,
106
+ console: nativeNavRef('hostPluginSection', '/products/catalog')
107
+ }
108
+ },
109
+ {
110
+ scope: 'site',
111
+ item: {
112
+ id: 'draftOrder',
113
+ label: 'Draft order',
114
+ icon: nativeNavIcon('link.badge.plus', 'link'),
115
+ screen: 'commerce.orders',
116
+ params: {
117
+ new: '1'
118
+ },
119
+ pluginId: 'commerce',
120
+ planFeature: 'commerce',
121
+ order: 30,
122
+ console: nativeNavRef('hostPluginSection', '/products/orders')
123
+ }
124
+ }
125
+ ];
126
+
127
+ //# sourceMappingURL=native-nav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/plugins/commerce/src/lib/native-nav.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type NativeNavContribution,\n type NativeNavCreateContribution,\n type NativeNavElsewhere,\n nativeNavHubSection,\n nativeNavIcon,\n nativeNavRef,\n} from '@aglyn/aglyn/app-utils/native-nav'\n\n/**\n * Orders and Products in the native apps' navigation (AGL-3943): the rows this plugin\n * adds to the manifest the shells draw, placed into the core's lists by\n * `order` (`assembleNativeNav`, `generate:native-contracts`). Labels are the\n * console's words, held by `apps/console/specs/native-nav-manifest.spec.ts`.\n *\n * Imports only the core's plain nav module, so the native contracts read it.\n */\n\nexport const NATIVE_NAV_ROWS: readonly NativeNavContribution[] = [\n {\n list: 'site',\n group: 'sell',\n row: {\n id: 'orders',\n label: 'Orders',\n icon: nativeNavIcon('bag', 'shopping_basket'),\n screen: 'commerce.orders',\n pluginId: 'commerce',\n order: 10,\n sections: [\n nativeNavHubSection('host', '/products', 'orders', 'Orders', 'commerce.orders'),\n nativeNavHubSection('host', '/products', 'returns', 'Returns', 'commerce.returns'),\n nativeNavHubSection('host', '/products', 'reservations', 'Reservations', 'commerce.reservations'),\n ],\n docs: '/commerce-and-bookings/commerce/overview',\n console: nativeNavRef('hostPluginSection', '/products/orders'),\n },\n },\n {\n list: 'site',\n group: 'sell',\n row: {\n id: 'products',\n label: 'Products',\n icon: nativeNavIcon('tag', 'sell'),\n screen: 'commerce.products',\n pluginId: 'commerce',\n order: 20,\n keywords: ['catalog', 'stock', 'inventory'],\n sections: [\n nativeNavHubSection('host', '/products', 'catalog', 'Catalog', 'commerce.products'),\n nativeNavHubSection('host', '/products', 'promotions', 'Promotions', 'commerce.promotions'),\n nativeNavHubSection('host', '/products', 'analytics', 'Analytics', 'commerce.sales'),\n ],\n actions: [\n {\n id: 'scan',\n label: 'Scan stock',\n icon: nativeNavIcon('barcode.viewfinder', 'qr_code_scanner'),\n screen: 'commerce.scan',\n },\n {\n id: 'newProduct',\n label: 'New product',\n icon: nativeNavIcon('plus', 'add'),\n screen: 'commerce.product',\n params: { new: '1' },\n },\n ],\n docs: '/commerce-and-bookings/commerce/overview',\n console: nativeNavRef('hostPluginTab', '/products'),\n },\n },\n]\n\n/** The console's POS tab is the register app's, not a row of this one. */\nexport const NATIVE_NAV_ELSEWHERE: readonly NativeNavElsewhere[] = [\n { console: nativeNavRef('hostPluginTab', '/pos'), where: 'The POS app' },\n]\n\n/** A product (\"Add product\" on Catalog) and a draft order (\"Draft order\" on Orders). */\nexport const NATIVE_NAV_CREATE: readonly NativeNavCreateContribution[] = [\n {\n scope: 'site',\n item: {\n id: 'product',\n label: 'Product',\n icon: nativeNavIcon('tag', 'sell'),\n screen: 'commerce.product',\n params: { new: '1' },\n pluginId: 'commerce',\n planFeature: 'commerce',\n order: 20,\n console: nativeNavRef('hostPluginSection', '/products/catalog'),\n },\n },\n {\n scope: 'site',\n item: {\n id: 'draftOrder',\n label: 'Draft order',\n icon: nativeNavIcon('link.badge.plus', 'link'),\n screen: 'commerce.orders',\n params: { new: '1' },\n pluginId: 'commerce',\n planFeature: 'commerce',\n order: 30,\n console: nativeNavRef('hostPluginSection', '/products/orders'),\n },\n },\n]\n"],"names":["nativeNavHubSection","nativeNavIcon","nativeNavRef","NATIVE_NAV_ROWS","list","group","row","id","label","icon","screen","pluginId","order","sections","docs","console","keywords","actions","params","new","NATIVE_NAV_ELSEWHERE","where","NATIVE_NAV_CREATE","scope","item","planFeature"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAIEA,mBAAmB,EACnBC,aAAa,EACbC,YAAY,QACP,oCAAmC;AAE1C;;;;;;;CAOC,GAED,OAAO,MAAMC,kBAA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ACVc,aAAa;YACbb,OAAO;YACPG,SAASb,aAAa,qBAAqB;QAC7C;IACF;IACA;QACEqB,OAAO;QACPC,MAAM;YACJjB,IAAI;YACJC,OAAO;YACPC,MAAMR,cAAc,mBAAmB;YACvCS,QAAQ;YACRQ,QAAQ;gBAAEC,KAAK;YAAI;YACnBR,UAAU;YACVc,aAAa;YACbb,OAAO;YACPG,SAASb,aAAa,qBAAqB;QAC7C;IACF;CACD,CAAA"}
@@ -34,6 +34,6 @@ export declare function hostEventPayloadFor(envelope: Pick<PluginDomainEventEnve
34
34
  */
35
35
  export declare function registerCommerceEventTriggers(): void;
36
36
  /** The order events that schedule a review request (AGL-3736). */
37
- export declare const REVIEW_REQUEST_EVENTS: readonly [import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../model").OrderFulfilledEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../model").OrderEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../model").OrderEventPayload>];
37
+ export declare const REVIEW_REQUEST_EVENTS: readonly [import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../contracts").OrderFulfilledEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../contracts").OrderEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../contracts").OrderEventPayload>];
38
38
  /** The order events that change what ShippingEasy should hold. */
39
- export declare const SHIPPINGEASY_EVENTS: readonly [import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../model").OrderEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../model").OrderEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../model").OrderRefundedEventPayload>];
39
+ export declare const SHIPPINGEASY_EVENTS: readonly [import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../contracts").OrderEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../contracts").OrderEventPayload>, import("@aglyn/aglyn/plugin-manager/plugin-domain-events").PluginDomainEvent<import("../contracts").OrderRefundedEventPayload>];