@preference-sl/prefconfigurator-wasm 2.0.2 → 3.0.1

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 (34) hide show
  1. package/_framework/PrefConfigurator.Abstractions.80zwzkbfaq.wasm +0 -0
  2. package/_framework/PrefConfigurator.Abstractions.80zwzkbfaq.wasm.br +0 -0
  3. package/_framework/PrefConfigurator.Abstractions.80zwzkbfaq.wasm.gz +0 -0
  4. package/_framework/PrefConfigurator.Application.1hmng36ei1.wasm +0 -0
  5. package/_framework/PrefConfigurator.Application.1hmng36ei1.wasm.br +0 -0
  6. package/_framework/PrefConfigurator.Application.1hmng36ei1.wasm.gz +0 -0
  7. package/_framework/{PrefConfigurator.Infrastructure.n5sneeto1e.wasm → PrefConfigurator.Infrastructure.j1910qp5xl.wasm} +0 -0
  8. package/_framework/PrefConfigurator.Infrastructure.j1910qp5xl.wasm.br +0 -0
  9. package/_framework/PrefConfigurator.Infrastructure.j1910qp5xl.wasm.gz +0 -0
  10. package/_framework/PrefConfigurator.Wasm.be5useelaz.wasm +0 -0
  11. package/_framework/PrefConfigurator.Wasm.be5useelaz.wasm.br +0 -0
  12. package/_framework/PrefConfigurator.Wasm.be5useelaz.wasm.gz +0 -0
  13. package/_framework/System.Runtime.InteropServices.JavaScript.uzeiy0hvqr.wasm +0 -0
  14. package/_framework/System.Runtime.InteropServices.JavaScript.uzeiy0hvqr.wasm.br +0 -0
  15. package/_framework/System.Runtime.InteropServices.JavaScript.uzeiy0hvqr.wasm.gz +0 -0
  16. package/_framework/blazor.boot.json +11 -11
  17. package/_framework/blazor.boot.json.br +0 -0
  18. package/_framework/blazor.boot.json.gz +0 -0
  19. package/js/prefconfigurator-api.d.ts +39 -34
  20. package/package.json +1 -1
  21. package/_framework/PrefConfigurator.Abstractions.fwvejvdcq3.wasm +0 -0
  22. package/_framework/PrefConfigurator.Abstractions.fwvejvdcq3.wasm.br +0 -0
  23. package/_framework/PrefConfigurator.Abstractions.fwvejvdcq3.wasm.gz +0 -0
  24. package/_framework/PrefConfigurator.Application.94zainehgq.wasm +0 -0
  25. package/_framework/PrefConfigurator.Application.94zainehgq.wasm.br +0 -0
  26. package/_framework/PrefConfigurator.Application.94zainehgq.wasm.gz +0 -0
  27. package/_framework/PrefConfigurator.Infrastructure.n5sneeto1e.wasm.br +0 -0
  28. package/_framework/PrefConfigurator.Infrastructure.n5sneeto1e.wasm.gz +0 -0
  29. package/_framework/PrefConfigurator.Wasm.zfpvrzjrju.wasm +0 -0
  30. package/_framework/PrefConfigurator.Wasm.zfpvrzjrju.wasm.br +0 -0
  31. package/_framework/PrefConfigurator.Wasm.zfpvrzjrju.wasm.gz +0 -0
  32. package/_framework/System.Runtime.InteropServices.JavaScript.xnuh5xkf65.wasm +0 -0
  33. package/_framework/System.Runtime.InteropServices.JavaScript.xnuh5xkf65.wasm.br +0 -0
  34. package/_framework/System.Runtime.InteropServices.JavaScript.xnuh5xkf65.wasm.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "PrefConfigurator.Wasm",
3
3
  "resources": {
4
- "hash": "sha256-wXkSwU8CGcQ2OQBdThgqd0sg5HEt7uiNzIvSEwzu6ws=",
4
+ "hash": "sha256-74mBxwAlj213x9e2ubiR7T4WUWPgbuQaW12c/xGiNzk=",
5
5
  "fingerprinting": {
6
6
  "Microsoft.CSharp.soa7iupusj.wasm": "Microsoft.CSharp.wasm",
7
7
  "Microsoft.Extensions.Caching.Abstractions.9tfokavdri.wasm": "Microsoft.Extensions.Caching.Abstractions.wasm",
@@ -34,10 +34,10 @@
34
34
  "Microsoft.Extensions.Options.bzdoshyjeq.wasm": "Microsoft.Extensions.Options.wasm",
35
35
  "Microsoft.Extensions.Primitives.ii8zcoqmmf.wasm": "Microsoft.Extensions.Primitives.wasm",
36
36
  "Newtonsoft.Json.ou6h2ikg0u.wasm": "Newtonsoft.Json.wasm",
37
- "PrefConfigurator.Abstractions.fwvejvdcq3.wasm": "PrefConfigurator.Abstractions.wasm",
38
- "PrefConfigurator.Application.94zainehgq.wasm": "PrefConfigurator.Application.wasm",
39
- "PrefConfigurator.Infrastructure.n5sneeto1e.wasm": "PrefConfigurator.Infrastructure.wasm",
40
- "PrefConfigurator.Wasm.zfpvrzjrju.wasm": "PrefConfigurator.Wasm.wasm",
37
+ "PrefConfigurator.Abstractions.80zwzkbfaq.wasm": "PrefConfigurator.Abstractions.wasm",
38
+ "PrefConfigurator.Application.1hmng36ei1.wasm": "PrefConfigurator.Application.wasm",
39
+ "PrefConfigurator.Infrastructure.j1910qp5xl.wasm": "PrefConfigurator.Infrastructure.wasm",
40
+ "PrefConfigurator.Wasm.be5useelaz.wasm": "PrefConfigurator.Wasm.wasm",
41
41
  "Preference.Hydra.OpenApi.oba396x8m7.wasm": "Preference.Hydra.OpenApi.wasm",
42
42
  "System.Collections.Concurrent.kq7l3koqtq.wasm": "System.Collections.Concurrent.wasm",
43
43
  "System.Collections.NonGeneric.u4veqqwbpo.wasm": "System.Collections.NonGeneric.wasm",
@@ -66,7 +66,7 @@
66
66
  "System.Private.Uri.jc206q478k.wasm": "System.Private.Uri.wasm",
67
67
  "System.Private.Xml.Linq.9ysa0v1ttg.wasm": "System.Private.Xml.Linq.wasm",
68
68
  "System.Private.Xml.2mzmg6bx15.wasm": "System.Private.Xml.wasm",
69
- "System.Runtime.InteropServices.JavaScript.xnuh5xkf65.wasm": "System.Runtime.InteropServices.JavaScript.wasm",
69
+ "System.Runtime.InteropServices.JavaScript.uzeiy0hvqr.wasm": "System.Runtime.InteropServices.JavaScript.wasm",
70
70
  "System.Runtime.Numerics.32wi3mkrsj.wasm": "System.Runtime.Numerics.wasm",
71
71
  "System.Runtime.Serialization.Formatters.s5bhjkguai.wasm": "System.Runtime.Serialization.Formatters.wasm",
72
72
  "System.Runtime.Serialization.Primitives.izguwlyy4t.wasm": "System.Runtime.Serialization.Primitives.wasm",
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "coreAssembly": {
102
102
  "System.Private.CoreLib.tuttj8u7r1.wasm": "sha256-Ze/XwGxz7iQV4RRLQobECwqlZcGfXEK6q6rdqYbmp6Q=",
103
- "System.Runtime.InteropServices.JavaScript.xnuh5xkf65.wasm": "sha256-gwGn+1zEmSSBNVtq68eXqAfQDvhxlVCpZ2wEZ1p6RTw="
103
+ "System.Runtime.InteropServices.JavaScript.uzeiy0hvqr.wasm": "sha256-ak7EFJZTPQg89Q04u4rgGsa3qBJEas6XblABTtlInPQ="
104
104
  },
105
105
  "assembly": {
106
106
  "Microsoft.CSharp.soa7iupusj.wasm": "sha256-JDQC1GXWLjOo5Qq19e7F2s41vcX4I4EIzJWPdsNYOgk=",
@@ -134,10 +134,10 @@
134
134
  "Microsoft.Extensions.Options.bzdoshyjeq.wasm": "sha256-OUMXYxUKhNC6l0LAh4xpi+gy+X9b0XXW3pZh9YdZ9C8=",
135
135
  "Microsoft.Extensions.Primitives.ii8zcoqmmf.wasm": "sha256-Jt5QBSXSDEahiZ89Pn1MhJ9A3C/ftN8ZXaBGV9JgqwQ=",
136
136
  "Newtonsoft.Json.ou6h2ikg0u.wasm": "sha256-8EZ4H5Mb5yxuavrUzuw5k75ewxJQbdU+Y1rksETqPVo=",
137
- "PrefConfigurator.Abstractions.fwvejvdcq3.wasm": "sha256-AcjPdHc2v0fmc9D/vTd09C83tF40ncbSYXyunacoQxk=",
138
- "PrefConfigurator.Application.94zainehgq.wasm": "sha256-Sf6GbUAIVedWGFXKPUOsDl0zinmnmH6EwtevGbgaxjQ=",
139
- "PrefConfigurator.Infrastructure.n5sneeto1e.wasm": "sha256-S4RQVQtx1BZJLlEUS3NUTUwgNVpD2AxiVSx5sP928xo=",
140
- "PrefConfigurator.Wasm.zfpvrzjrju.wasm": "sha256-cRa3stJ7A6Kp/4PU80OVWvD4s1G73D3xz0FkqePFr0w=",
137
+ "PrefConfigurator.Abstractions.80zwzkbfaq.wasm": "sha256-yEOVgxuf4QCCUwVnBIYqWkMJsO/xZDA5SCDvn7DPWCE=",
138
+ "PrefConfigurator.Application.1hmng36ei1.wasm": "sha256-e1KNMqFmT3CqTmMBQnd6lhCcnxCpusNdYhLUhHyoHWk=",
139
+ "PrefConfigurator.Infrastructure.j1910qp5xl.wasm": "sha256-+aNFvfJ4v4XYoZYUzrUjw3Nmpi6lPRTOyTxC3cLN188=",
140
+ "PrefConfigurator.Wasm.be5useelaz.wasm": "sha256-0yqcCaq6RkI92vU+KDhDFzwEGEG1jxvKs5YYGLC+/80=",
141
141
  "Preference.Hydra.OpenApi.oba396x8m7.wasm": "sha256-BOitG9XqTGoVdagU40GvNefDuOylKCPs3Gp5VG0M3oY=",
142
142
  "System.Collections.Concurrent.kq7l3koqtq.wasm": "sha256-lDJetX8MOCPfYgq+j+JjNEwEFA9oW7BLaaNmAFUZQaE=",
143
143
  "System.Collections.NonGeneric.u4veqqwbpo.wasm": "sha256-Hlfxail2eLYOSROomwSdgZ3zfxPgxeQCs+6AiZn4uBE=",
Binary file
Binary file
@@ -83,6 +83,11 @@ export interface SetDimensionsResponse {
83
83
  Message?: string | null;
84
84
  }
85
85
 
86
+ export interface SetDimensionValueRequest {
87
+ dimensionName: string;
88
+ dimensionValue: number;
89
+ }
90
+
86
91
  export interface SetOptionValueResponse {
87
92
  succeeded: boolean;
88
93
  status?: string | null;
@@ -220,12 +225,31 @@ export interface EnvJson {
220
225
  }
221
226
 
222
227
  export enum ViewMode {
223
- _0, _1, _2, _3
228
+ _0,
229
+ _1,
230
+ _2,
231
+ _3
224
232
  }
225
233
 
226
234
  export enum ImageType {
227
- _0, _1, _2, _3, _4, _5, _6, _7, _8, _9,
228
- _10, _11, _12, _13, _14, _15, _16, _17
235
+ _0,
236
+ _1,
237
+ _2,
238
+ _3,
239
+ _4,
240
+ _5,
241
+ _6,
242
+ _7,
243
+ _8,
244
+ _9,
245
+ _10,
246
+ _11,
247
+ _12,
248
+ _13,
249
+ _14,
250
+ _15,
251
+ _16,
252
+ _17
229
253
  }
230
254
 
231
255
  export interface CadRendererData {
@@ -252,12 +276,13 @@ export interface ModelImageConfig {
252
276
 
253
277
  export interface JsInteropApiRaw {
254
278
  InitializeFromEnvJson(json: string): void;
279
+
255
280
  GetOptions<T = EnhancedOptionList>(): Promise<OperationResult<T> | string>;
256
281
  UpdateOptions<T = EnhancedOptionList>(optionListJson: string, optionNameChanged: string): Promise<OperationResult<T> | string>;
257
282
  CreateItem<T = CreateItemResponse>(modelCode: string, isPersistable: boolean): Promise<OperationResult<T> | string>;
258
283
  GetDimensions<T = DimensionsResponse>(modelId: string): Promise<OperationResult<T> | string>;
259
- SetDimensions<T = SetDimensionsResponse>(modelId: string, dimensionName: string, dimensionValue: number): Promise<OperationResult<T> | string>;
260
- SetOptions<T = SetOptionsResponse>(modelId: string, optionsJson: string): Promise<OperationResult<T> | string>;
284
+ SetDimensions<T = SetDimensionsResponse>(modelId: string, dimensions: SetDimensionValueRequest[]): Promise<OperationResult<T> | string>;
285
+ SetOptions<T = SetOptionsResponse>(modelId: string, options: SetOptionValueRequest[]): Promise<OperationResult<T> | string>;
261
286
  GetModelOptions<T = OptionInfo[]>(modelId: string): Promise<OperationResult<T> | string>;
262
287
  GetScene<T = Scene>(sceneName?: string, sceneFormat?: string, texturesRootPath?: string): Promise<OperationResult<T> | string>;
263
288
  GetModelImage(modelId: string, modelImageConfigJson: string, sceneName?: string): Promise<OperationResult<string> | string>;
@@ -271,49 +296,29 @@ export interface JsInteropApiRaw {
271
296
  GetSceneName(): string;
272
297
  GetSceneFormat(): string;
273
298
  GetTextureRootPath(): string;
299
+
274
300
  [key: string]: unknown;
275
301
  }
276
302
 
277
303
  export type RawOperation<T = JsonValue> = OperationResult<T> | string | null | undefined;
278
304
 
279
305
  export function parse<T = JsonValue>(raw: RawOperation<T>): OperationResult<T>;
306
+
280
307
  export function ensureOk<T = JsonValue>(raw: RawOperation<T>): T;
281
308
 
282
309
  type AwaitedReturn<T> = T extends Promise<infer R> ? R : T;
283
310
  type ExtractData<R> = AwaitedReturn<R> extends OperationResult<infer D> ? D : JsonValue;
311
+ type BoundMethod<F> = F extends (...args: infer A) => Promise<infer R> ? (...args: A) => Promise<ExtractData<R>> : F;
284
312
 
285
- type BoundMethod<F> =
286
- F extends (...args: infer A) => Promise<infer R>
287
- ? (...args: A) => Promise<ExtractData<R>>
288
- : F;
289
-
290
- //
291
- // BOUND API � PUBLIC API CORRECTLY TYPED
292
- //
313
+ // BOUND API — PUBLIC API CORRECTLY TYPED
293
314
 
294
- export type BoundApi<TRaw extends JsInteropApiRaw> = {
295
- [K in keyof TRaw]: TRaw[K] extends Function
296
- ? BoundMethod<TRaw[K]>
297
- : TRaw[K];
315
+ export type BoundApi<TRaw extends JsInteropApiRaw> = { [K in keyof TRaw]: TRaw[K] extends Function ? BoundMethod<TRaw[K]> : TRaw[K];
298
316
  } & {
299
-
300
317
  InitializeFromEnvJson(config: EnvJson): void;
301
-
302
- UpdateOptions(
303
- optionList: OptionList,
304
- changedOptionName: string
305
- ): Promise<EnhancedOptionList>;
306
-
307
- SetOptions(
308
- modelId: string,
309
- updates: SetOptionValueRequest[]
310
- ): Promise<SetOptionsResponse>;
311
-
312
- GetModelImage(
313
- modelId: string,
314
- config: ModelImageConfig,
315
- sceneName?: string
316
- ): Promise<string>;
318
+ UpdateOptions(optionList: OptionList, changedOptionName: string): Promise<EnhancedOptionList>;
319
+ SetDimensions(modelId: string, updates: SetDimensionValueRequest[]): Promise<SetDimensionsResponse>;
320
+ SetOptions(modelId: string, updates: SetOptionValueRequest[]): Promise<SetOptionsResponse>;
321
+ GetModelImage(modelId: string, config: ModelImageConfig, sceneName?: string): Promise<string>;
317
322
  };
318
323
 
319
324
  export function bindApi<TRaw extends JsInteropApiRaw>(rawApi: TRaw): BoundApi<TRaw>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "postinstall": "node scripts/postinstall.js"
4
4
  },
5
5
  "description": ".NET WebAssembly runtime package that centralizes logic for building product configurators, exposing a simple API for integration into ecommerce platforms.",
6
- "version": "2.0.2",
6
+ "version": "3.0.1",
7
7
  "files": [
8
8
  "_framework/**",
9
9
  "**/*.js",