@mj-biz-apps/orders-entities 5.1.0 → 5.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.
- package/dist/OrderHeaderEntity.d.ts +15 -0
- package/dist/OrderHeaderEntity.d.ts.map +1 -1
- package/dist/OrderHeaderEntity.js +54 -1
- package/dist/OrderHeaderEntity.js.map +1 -1
- package/dist/OrderLineExtensionCompanion.d.ts.map +1 -1
- package/dist/OrderLineExtensionCompanion.js +8 -0
- package/dist/OrderLineExtensionCompanion.js.map +1 -1
- package/dist/OrderStatusBehavior.d.ts +31 -22
- package/dist/OrderStatusBehavior.d.ts.map +1 -1
- package/dist/OrderStatusBehavior.js +47 -51
- package/dist/OrderStatusBehavior.js.map +1 -1
- package/dist/PartyAffiliationBehavior.d.ts +20 -0
- package/dist/PartyAffiliationBehavior.d.ts.map +1 -0
- package/dist/PartyAffiliationBehavior.js +52 -0
- package/dist/PartyAffiliationBehavior.js.map +1 -0
- package/dist/configuration-types.d.ts +157 -0
- package/dist/configuration-types.d.ts.map +1 -0
- package/dist/configuration-types.js +10 -0
- package/dist/configuration-types.js.map +1 -0
- package/dist/generated/entity_subclasses.d.ts +859 -289
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +1180 -364
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/generated/remote_operations.d.ts +153 -2
- package/dist/generated/remote_operations.d.ts.map +1 -1
- package/dist/generated/remote_operations.js +144 -0
- package/dist/generated/remote_operations.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pricing/OrderPricingService.d.ts +14 -7
- package/dist/pricing/OrderPricingService.d.ts.map +1 -1
- package/dist/pricing/OrderPricingService.js +2 -0
- package/dist/pricing/OrderPricingService.js.map +1 -1
- package/dist/pricing/PriceResolver.d.ts +11 -6
- package/dist/pricing/PriceResolver.d.ts.map +1 -1
- package/dist/pricing/PriceResolver.js +35 -22
- package/dist/pricing/PriceResolver.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Configuration JSON Types for BizApps Orders
|
|
3
|
+
*
|
|
4
|
+
* Defines strongly-typed JSON configuration schemas for Product Types, Checkout Widgets,
|
|
5
|
+
* and custom UI pluggability (custom JS lifecycle hooks, scoped CSS, themes, and component overrides).
|
|
6
|
+
*
|
|
7
|
+
* @module @mj-biz-apps/orders-entities/configuration-types
|
|
8
|
+
*/
|
|
9
|
+
export interface CustomUIThemeConfiguration {
|
|
10
|
+
primaryColor?: string;
|
|
11
|
+
accentColor?: string;
|
|
12
|
+
borderRadius?: string;
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface CustomUIConfiguration {
|
|
19
|
+
/**
|
|
20
|
+
* Custom JavaScript code string containing lifecycle hooks or UI handlers.
|
|
21
|
+
*/
|
|
22
|
+
js?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Custom CSS stylesheet string containing scoped styling rules.
|
|
25
|
+
*/
|
|
26
|
+
css?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Theme tokens and color customizations.
|
|
29
|
+
*/
|
|
30
|
+
theme?: CustomUIThemeConfiguration;
|
|
31
|
+
/**
|
|
32
|
+
* Registered custom component override key/class name.
|
|
33
|
+
*/
|
|
34
|
+
componentOverrideKey?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Additional UI settings and options.
|
|
37
|
+
*/
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface FieldOverrideConfiguration {
|
|
41
|
+
label?: string;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
hidden?: boolean;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
defaultValue?: unknown;
|
|
46
|
+
order?: number;
|
|
47
|
+
options?: Array<{
|
|
48
|
+
label: string;
|
|
49
|
+
value: string | number;
|
|
50
|
+
}>;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
export interface ProductTypeConfiguration {
|
|
54
|
+
/**
|
|
55
|
+
* Unit mode: 'perUnit' (discrete repeating fieldsets) vs 'perLine' (single fieldset for the line).
|
|
56
|
+
*/
|
|
57
|
+
unitMode?: 'perUnit' | 'perLine';
|
|
58
|
+
/**
|
|
59
|
+
* Maximum quantity allowed per order or line.
|
|
60
|
+
*/
|
|
61
|
+
maxQuantity?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether quantity selection is permitted in self-service checkout surfaces.
|
|
64
|
+
*/
|
|
65
|
+
allowQuantity?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Field overrides and customizations for line extension entity fields.
|
|
68
|
+
*/
|
|
69
|
+
fieldOverrides?: Record<string, FieldOverrideConfiguration>;
|
|
70
|
+
/**
|
|
71
|
+
* Custom UI section containing JS hooks, scoped CSS, theme tokens, and component overrides.
|
|
72
|
+
*/
|
|
73
|
+
customUI?: CustomUIConfiguration;
|
|
74
|
+
/**
|
|
75
|
+
* Extensible custom properties.
|
|
76
|
+
*/
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
export interface CheckoutWidgetConfiguration {
|
|
80
|
+
title?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
productId?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Explicit catalog this widget may sell. The anonymous draft edge rejects any
|
|
85
|
+
* ProductID not in this list (plus `productId` / SKU-resolved id). An empty
|
|
86
|
+
* catalog is a misconfiguration and the draft is refused, unless
|
|
87
|
+
* `allowAnyProduct` is explicitly true.
|
|
88
|
+
*/
|
|
89
|
+
allowedProductIds?: string[];
|
|
90
|
+
/**
|
|
91
|
+
* When true, this widget sells any product that shares its CompanyID — an
|
|
92
|
+
* explicit open catalog, not the default. Absence of `productId` /
|
|
93
|
+
* `allowedProductIds` is NOT an open catalog. Requires the widget
|
|
94
|
+
* CompanyID (fail-closed if unset). Server-side only.
|
|
95
|
+
*/
|
|
96
|
+
allowAnyProduct?: boolean;
|
|
97
|
+
/** Alternative product resolution by SKU when productId is not set. */
|
|
98
|
+
productSku?: string;
|
|
99
|
+
productName?: string;
|
|
100
|
+
unitPrice?: number;
|
|
101
|
+
currency?: string;
|
|
102
|
+
unitMode?: 'perUnit' | 'perLine';
|
|
103
|
+
allowQuantity?: boolean;
|
|
104
|
+
maxQuantity?: number;
|
|
105
|
+
stripePublishableKey?: string;
|
|
106
|
+
successMessage?: string;
|
|
107
|
+
redirectUrl?: string;
|
|
108
|
+
extensionEntityName?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Metadata-driven form field specs — auto-discovered from the product type's extension
|
|
111
|
+
* entity when not explicitly authored.
|
|
112
|
+
*/
|
|
113
|
+
extensionFields?: Array<{
|
|
114
|
+
name: string;
|
|
115
|
+
label: string;
|
|
116
|
+
type: 'text' | 'textarea' | 'number' | 'date' | 'boolean' | 'select';
|
|
117
|
+
required?: boolean;
|
|
118
|
+
placeholder?: string;
|
|
119
|
+
options?: Array<string | {
|
|
120
|
+
label: string;
|
|
121
|
+
value: string | number;
|
|
122
|
+
}>;
|
|
123
|
+
}>;
|
|
124
|
+
/**
|
|
125
|
+
* The PaymentProvider row id used to open payment intents for this widget's sessions.
|
|
126
|
+
* Admin-authored, server-resolved — never accepted from the client. Required before a
|
|
127
|
+
* paid checkout can complete.
|
|
128
|
+
*/
|
|
129
|
+
paymentProviderId?: string;
|
|
130
|
+
/**
|
|
131
|
+
* `PaymentType.Code` used when CompleteCheckout books `Orders.CapturePayment`
|
|
132
|
+
* (e.g. `CreditCard`, `ACH`). Server-side only. Defaults to `CreditCard`.
|
|
133
|
+
*/
|
|
134
|
+
tenderCode?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Origins (scheme + host [+ port]) allowed to embed and drive this widget through the
|
|
137
|
+
* anonymous checkout edge. When set, requests whose Origin header does not match are
|
|
138
|
+
* refused and receive no CORS grant. When absent, the edge allows any origin (the
|
|
139
|
+
* distribution slug remains the access control).
|
|
140
|
+
*/
|
|
141
|
+
allowedOrigins?: string[];
|
|
142
|
+
/**
|
|
143
|
+
* When true, the anonymous checkout edge requires a Cloudflare Turnstile token on
|
|
144
|
+
* session initialization and completion (the edge must also be configured with a
|
|
145
|
+
* Turnstile secret for verification to run — fail-closed when it is not).
|
|
146
|
+
*/
|
|
147
|
+
requireTurnstile?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Custom UI section containing JS hooks, scoped CSS, theme tokens, and component overrides.
|
|
150
|
+
*/
|
|
151
|
+
customUI?: CustomUIConfiguration;
|
|
152
|
+
/**
|
|
153
|
+
* Extensible custom properties.
|
|
154
|
+
*/
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=configuration-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration-types.d.ts","sourceRoot":"","sources":["../src/configuration-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,0BAA0B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,0BAA0B,CAAC;IACnC;;OAEG;IACH,oBAAoB,CAAC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JSON configuration schemas for Product Types, Checkout Widgets,
|
|
5
|
+
* and custom UI pluggability (custom JS lifecycle hooks, scoped CSS, themes, and component overrides).
|
|
6
|
+
*
|
|
7
|
+
* @module @mj-biz-apps/orders-entities/configuration-types
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=configuration-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration-types.js","sourceRoot":"","sources":["../src/configuration-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|