@spiffcommerce/core 14.4.0 → 14.6.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/main.js +50 -46
- package/dist/module.js +63 -59
- package/dist/types.d.ts +37 -3
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1049,6 +1049,7 @@ interface _Bundle1 {
|
|
|
1049
1049
|
id?: string;
|
|
1050
1050
|
bundleOwnerId?: string;
|
|
1051
1051
|
bundleStakeholders?: BundleStakeholder[];
|
|
1052
|
+
bundleStateData?: string;
|
|
1052
1053
|
metadata?: {
|
|
1053
1054
|
key: string;
|
|
1054
1055
|
value: string;
|
|
@@ -1082,6 +1083,16 @@ type GlobalPropertyStateAspect = {
|
|
|
1082
1083
|
name: string;
|
|
1083
1084
|
value: string;
|
|
1084
1085
|
};
|
|
1086
|
+
interface BundleStateTransform {
|
|
1087
|
+
position: Vector3;
|
|
1088
|
+
rotation: Vector3;
|
|
1089
|
+
scale: Vector3;
|
|
1090
|
+
}
|
|
1091
|
+
interface Vector3 {
|
|
1092
|
+
x: number;
|
|
1093
|
+
y: number;
|
|
1094
|
+
z: number;
|
|
1095
|
+
}
|
|
1085
1096
|
interface StorageService {
|
|
1086
1097
|
/**
|
|
1087
1098
|
* Get a value.
|
|
@@ -2104,6 +2115,11 @@ export interface Bundle {
|
|
|
2104
2115
|
* @param experience The workflow experience to remove from this bundle.
|
|
2105
2116
|
*/
|
|
2106
2117
|
removeWorkflowExperience(experience: WorkflowExperience): Promise<void>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Remove a workflow experience from this bundle by transaction.
|
|
2120
|
+
* @param transaction The transaction to remove from this bundle.
|
|
2121
|
+
*/
|
|
2122
|
+
removeWorkflowExperienceByTransaction(transaction: Transaction): Promise<void>;
|
|
2107
2123
|
/**
|
|
2108
2124
|
* Returns all workflow experiences currently added to this bundle.
|
|
2109
2125
|
*/
|
|
@@ -2144,11 +2160,11 @@ export interface Bundle {
|
|
|
2144
2160
|
* @param event The event to listen for. Currently only "conditional-global-properties-changed" is supported.
|
|
2145
2161
|
* @param listener The listener to call when the event occurs.
|
|
2146
2162
|
*/
|
|
2147
|
-
addEventListener(event:
|
|
2163
|
+
addEventListener(event: BundleEventType, listener: (e: BundleEvent) => void): void;
|
|
2148
2164
|
/**
|
|
2149
2165
|
* Remove a previously added event listener from this bundle.
|
|
2150
2166
|
*/
|
|
2151
|
-
removeEventListener(event:
|
|
2167
|
+
removeEventListener(event: BundleEventType, listener: (e: BundleEvent) => void): void;
|
|
2152
2168
|
/**
|
|
2153
2169
|
* Retrieves the current preview service for this bundle, if one exists.
|
|
2154
2170
|
* If a preview service was specified when calling client.getExistingBundle, this will return that service.
|
|
@@ -2168,8 +2184,26 @@ export interface Bundle {
|
|
|
2168
2184
|
* This will resolve immediately if the bundle has no experiences, or if the bundle has already been initialized.
|
|
2169
2185
|
*/
|
|
2170
2186
|
getInitializationPromise(): Promise<void>;
|
|
2187
|
+
/**
|
|
2188
|
+
* Sets the position, rotation, and scale of a workflow experience within this bundle.
|
|
2189
|
+
* @param workflowExperience The workflow experience to update.
|
|
2190
|
+
* @param transform An object containing `position`, `rotation`, and `scale` properties. Each property is an object with `x`, `y`, and `z` properties.
|
|
2191
|
+
*/
|
|
2192
|
+
setWorkflowExperienceTransform(workflowExperience: WorkflowExperience, transform: BundleStateTransform): Promise<void>;
|
|
2193
|
+
}
|
|
2194
|
+
type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
|
|
2195
|
+
type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
|
|
2196
|
+
type BundleEvent = {
|
|
2197
|
+
bundle: Bundle;
|
|
2198
|
+
data: BundleEventData;
|
|
2199
|
+
event: BundleEventType;
|
|
2200
|
+
};
|
|
2201
|
+
interface ConditionalGlobalPropertiesChangedEventData {
|
|
2202
|
+
globalProperties: GlobalPropertyHandle[];
|
|
2203
|
+
}
|
|
2204
|
+
interface WorkflowExperienceHoverEventData {
|
|
2205
|
+
workflowExperience: WorkflowExperience;
|
|
2171
2206
|
}
|
|
2172
|
-
type BundleEvent = "conditional-global-properties-changed";
|
|
2173
2207
|
interface ExecutionResponse {
|
|
2174
2208
|
id: string;
|
|
2175
2209
|
completedAt?: string;
|