@preference-sl/prefconfigurator-wasm 0.2.6 → 1.0.0-2

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 (51) hide show
  1. package/_framework/PrefConfigurator.Abstractions.2470itu0bk.wasm +0 -0
  2. package/_framework/PrefConfigurator.Abstractions.2470itu0bk.wasm.br +0 -0
  3. package/_framework/PrefConfigurator.Abstractions.2470itu0bk.wasm.gz +0 -0
  4. package/_framework/PrefConfigurator.Application.xskv3o4iai.wasm +0 -0
  5. package/_framework/PrefConfigurator.Application.xskv3o4iai.wasm.br +0 -0
  6. package/_framework/PrefConfigurator.Application.xskv3o4iai.wasm.gz +0 -0
  7. package/_framework/PrefConfigurator.Infrastructure.tpdqlvop02.wasm +0 -0
  8. package/_framework/PrefConfigurator.Infrastructure.tpdqlvop02.wasm.br +0 -0
  9. package/_framework/PrefConfigurator.Infrastructure.tpdqlvop02.wasm.gz +0 -0
  10. package/_framework/PrefConfigurator.Wasm.trjmo0ylt0.wasm +0 -0
  11. package/_framework/PrefConfigurator.Wasm.trjmo0ylt0.wasm.br +0 -0
  12. package/_framework/PrefConfigurator.Wasm.trjmo0ylt0.wasm.gz +0 -0
  13. package/_framework/System.Net.Http.gt1jllox6p.wasm +0 -0
  14. package/_framework/System.Net.Http.gt1jllox6p.wasm.br +0 -0
  15. package/_framework/System.Net.Http.gt1jllox6p.wasm.gz +0 -0
  16. package/_framework/System.Private.CoreLib.w91kjoh040.wasm +0 -0
  17. package/_framework/System.Private.CoreLib.w91kjoh040.wasm.br +0 -0
  18. package/_framework/System.Private.CoreLib.w91kjoh040.wasm.gz +0 -0
  19. package/_framework/{System.Text.Json.rm38f7de5e.wasm → System.Text.Json.tz7oagugff.wasm} +0 -0
  20. package/_framework/System.Text.Json.tz7oagugff.wasm.br +0 -0
  21. package/_framework/System.Text.Json.tz7oagugff.wasm.gz +0 -0
  22. package/_framework/blazor.boot.json +17 -17
  23. package/_framework/blazor.boot.json.br +0 -0
  24. package/_framework/blazor.boot.json.gz +0 -0
  25. package/_framework/{dotnet.native.s0zd8usuuk.wasm → dotnet.native.6knj68ydzo.wasm} +0 -0
  26. package/_framework/dotnet.native.6knj68ydzo.wasm.br +0 -0
  27. package/_framework/{dotnet.native.s0zd8usuuk.wasm.gz → dotnet.native.6knj68ydzo.wasm.gz} +0 -0
  28. package/js/prefconfigurator-api.d.ts +124 -0
  29. package/js/prefconfigurator-api.js +44 -0
  30. package/package.json +2 -1
  31. package/_framework/PrefConfigurator.Abstractions.vm03hos2ke.wasm +0 -0
  32. package/_framework/PrefConfigurator.Abstractions.vm03hos2ke.wasm.br +0 -0
  33. package/_framework/PrefConfigurator.Abstractions.vm03hos2ke.wasm.gz +0 -0
  34. package/_framework/PrefConfigurator.Application.btlky88xg7.wasm +0 -0
  35. package/_framework/PrefConfigurator.Application.btlky88xg7.wasm.br +0 -0
  36. package/_framework/PrefConfigurator.Application.btlky88xg7.wasm.gz +0 -0
  37. package/_framework/PrefConfigurator.Infrastructure.0jy4m5569d.wasm +0 -0
  38. package/_framework/PrefConfigurator.Infrastructure.0jy4m5569d.wasm.br +0 -0
  39. package/_framework/PrefConfigurator.Infrastructure.0jy4m5569d.wasm.gz +0 -0
  40. package/_framework/PrefConfigurator.Wasm.089eo0o8qy.wasm +0 -0
  41. package/_framework/PrefConfigurator.Wasm.089eo0o8qy.wasm.br +0 -0
  42. package/_framework/PrefConfigurator.Wasm.089eo0o8qy.wasm.gz +0 -0
  43. package/_framework/System.Net.Http.gmpsgmxqly.wasm +0 -0
  44. package/_framework/System.Net.Http.gmpsgmxqly.wasm.br +0 -0
  45. package/_framework/System.Net.Http.gmpsgmxqly.wasm.gz +0 -0
  46. package/_framework/System.Private.CoreLib.r407h18r1v.wasm +0 -0
  47. package/_framework/System.Private.CoreLib.r407h18r1v.wasm.br +0 -0
  48. package/_framework/System.Private.CoreLib.r407h18r1v.wasm.gz +0 -0
  49. package/_framework/System.Text.Json.rm38f7de5e.wasm.br +0 -0
  50. package/_framework/System.Text.Json.rm38f7de5e.wasm.gz +0 -0
  51. package/_framework/dotnet.native.s0zd8usuuk.wasm.br +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "PrefConfigurator.Wasm",
3
3
  "resources": {
4
- "hash": "sha256-Hdd8PDQEVTopou0D8Iz0WGuXp8DY7wKQw4GK/LEgc4A=",
4
+ "hash": "sha256-kzxTumEEJF0ZQ3qWGSQTZrO3IKKRXEDRMpOZIqHqzHM=",
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.vm03hos2ke.wasm": "PrefConfigurator.Abstractions.wasm",
38
- "PrefConfigurator.Application.btlky88xg7.wasm": "PrefConfigurator.Application.wasm",
39
- "PrefConfigurator.Infrastructure.0jy4m5569d.wasm": "PrefConfigurator.Infrastructure.wasm",
40
- "PrefConfigurator.Wasm.089eo0o8qy.wasm": "PrefConfigurator.Wasm.wasm",
37
+ "PrefConfigurator.Abstractions.2470itu0bk.wasm": "PrefConfigurator.Abstractions.wasm",
38
+ "PrefConfigurator.Application.xskv3o4iai.wasm": "PrefConfigurator.Application.wasm",
39
+ "PrefConfigurator.Infrastructure.tpdqlvop02.wasm": "PrefConfigurator.Infrastructure.wasm",
40
+ "PrefConfigurator.Wasm.trjmo0ylt0.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",
@@ -59,10 +59,10 @@
59
59
  "System.Linq.u56iv5e4yk.wasm": "System.Linq.wasm",
60
60
  "System.Memory.kmqbercdt6.wasm": "System.Memory.wasm",
61
61
  "System.Net.Http.Json.bsdba5wf1r.wasm": "System.Net.Http.Json.wasm",
62
- "System.Net.Http.gmpsgmxqly.wasm": "System.Net.Http.wasm",
62
+ "System.Net.Http.gt1jllox6p.wasm": "System.Net.Http.wasm",
63
63
  "System.Net.Primitives.evghnwnikt.wasm": "System.Net.Primitives.wasm",
64
64
  "System.ObjectModel.5pc4wvg8um.wasm": "System.ObjectModel.wasm",
65
- "System.Private.CoreLib.r407h18r1v.wasm": "System.Private.CoreLib.wasm",
65
+ "System.Private.CoreLib.w91kjoh040.wasm": "System.Private.CoreLib.wasm",
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",
@@ -72,12 +72,12 @@
72
72
  "System.Runtime.Serialization.Primitives.izguwlyy4t.wasm": "System.Runtime.Serialization.Primitives.wasm",
73
73
  "System.Security.Cryptography.81im1fetsl.wasm": "System.Security.Cryptography.wasm",
74
74
  "System.Text.Encodings.Web.xu4vg14f8l.wasm": "System.Text.Encodings.Web.wasm",
75
- "System.Text.Json.rm38f7de5e.wasm": "System.Text.Json.wasm",
75
+ "System.Text.Json.tz7oagugff.wasm": "System.Text.Json.wasm",
76
76
  "System.Text.RegularExpressions.zuttf5ml29.wasm": "System.Text.RegularExpressions.wasm",
77
77
  "System.t8xd33e5pv.wasm": "System.wasm",
78
78
  "System.Xml.Linq.mglmvb8jto.wasm": "System.Xml.Linq.wasm",
79
79
  "dotnet.native.5hgeczey1o.js": "dotnet.native.js",
80
- "dotnet.native.s0zd8usuuk.wasm": "dotnet.native.wasm",
80
+ "dotnet.native.6knj68ydzo.wasm": "dotnet.native.wasm",
81
81
  "dotnet.js": "dotnet.js",
82
82
  "dotnet.runtime.ew19f13umk.js": "dotnet.runtime.js",
83
83
  "icudt_CJK.tjcz0u77k5.dat": "icudt_CJK.dat",
@@ -91,7 +91,7 @@
91
91
  "dotnet.runtime.ew19f13umk.js": "sha256-Isv/63htfX73xgn3/2cZMtk4S8xBcbmlXRgJMDv4mhI="
92
92
  },
93
93
  "wasmNative": {
94
- "dotnet.native.s0zd8usuuk.wasm": "sha256-jHJVlX6HJ9pa7UAavDZDXhWxRuMlYySHm/ND+rRoAtQ="
94
+ "dotnet.native.6knj68ydzo.wasm": "sha256-BkSpigDdUxVlEYzv03OvJFG3bsk7s6R4LcD6ho6AFps="
95
95
  },
96
96
  "icu": {
97
97
  "icudt_CJK.tjcz0u77k5.dat": "sha256-SZLtQnRc0JkwqHab0VUVP7T3uBPSeYzxzDnpxPpUnHk=",
@@ -99,7 +99,7 @@
99
99
  "icudt_no_CJK.lfu7j35m59.dat": "sha256-L7sV7NEYP37/Qr2FPCePo5cJqRgTXRwGHuwF5Q+0Nfs="
100
100
  },
101
101
  "coreAssembly": {
102
- "System.Private.CoreLib.r407h18r1v.wasm": "sha256-lW4mAeNThPv24iN1NBry2llfTjhdEFXI5dbsh9sSvoE=",
102
+ "System.Private.CoreLib.w91kjoh040.wasm": "sha256-jFlXNU1XI+WKQ8dTAZbqMZ7vtqotl5I3E/oUq0IGNNY=",
103
103
  "System.Runtime.InteropServices.JavaScript.xnuh5xkf65.wasm": "sha256-gwGn+1zEmSSBNVtq68eXqAfQDvhxlVCpZ2wEZ1p6RTw="
104
104
  },
105
105
  "assembly": {
@@ -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.vm03hos2ke.wasm": "sha256-93azRu7yMghzPBfEHl556Rw7Ot8k2FPo9r1QOc5vPPU=",
138
- "PrefConfigurator.Application.btlky88xg7.wasm": "sha256-b+0l0B/zTpQ0SH5Q+gFaX+kJM0adUa7saQ5yiFs9Aes=",
139
- "PrefConfigurator.Infrastructure.0jy4m5569d.wasm": "sha256-zGHaKYHHkfhyd+TVaPT99oi6+kdqpyYPsJnfki6u29s=",
140
- "PrefConfigurator.Wasm.089eo0o8qy.wasm": "sha256-ML6uTFmrYZwc7rOL10B3NPa3rfWl2hKy6XgwmNT8+g4=",
137
+ "PrefConfigurator.Abstractions.2470itu0bk.wasm": "sha256-AuogEY8QpHp/dltWfNg6u/IBpC4th+Cpt6fr7ef8TaI=",
138
+ "PrefConfigurator.Application.xskv3o4iai.wasm": "sha256-EX7xq6Z6TE9whyu9bvjlY4uIe7zlNrDiBKbmvalwifk=",
139
+ "PrefConfigurator.Infrastructure.tpdqlvop02.wasm": "sha256-D2cjg9+4VyiHU4Jmpi2JFyCQhKSG9gRq2I5dbXjyLUg=",
140
+ "PrefConfigurator.Wasm.trjmo0ylt0.wasm": "sha256-mYWPl9G44SRn/OU0GrUzCBrqQkCTOM0IKSCYBa5bS3g=",
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=",
@@ -159,7 +159,7 @@
159
159
  "System.Linq.u56iv5e4yk.wasm": "sha256-Tn3VYG+D3uyFILR6O+wNERXs0RkfQCzPJHIc2mCJ8ew=",
160
160
  "System.Memory.kmqbercdt6.wasm": "sha256-jHUxYsvLYsoOdqHU7eyYfNLbS8nGuuBvXqxOR3dPfq0=",
161
161
  "System.Net.Http.Json.bsdba5wf1r.wasm": "sha256-dafdf576k9LA9iLSdpxe6AG3GLufSQKtpqfbnRSf4i4=",
162
- "System.Net.Http.gmpsgmxqly.wasm": "sha256-uCi5vROnE6NSU4zKrlC430dtw24DqTdqAT0xjctYy7I=",
162
+ "System.Net.Http.gt1jllox6p.wasm": "sha256-DAcvj8km0/ecDg4LwSqpg7EYYsEX/3ab2U9picbPrPg=",
163
163
  "System.Net.Primitives.evghnwnikt.wasm": "sha256-VqluKffy/OTxept04cce4C+kkbZ4i0cm7j+US0qVijA=",
164
164
  "System.ObjectModel.5pc4wvg8um.wasm": "sha256-t+plhoS+7YjjDjsx0xpEq/mORCjQKFtK62I6QlbVCEw=",
165
165
  "System.Private.Uri.jc206q478k.wasm": "sha256-HYa5GWcOgVn8X5kpTHXbJmlT0FqZj0qAYsz1O9/E7RA=",
@@ -170,7 +170,7 @@
170
170
  "System.Runtime.Serialization.Primitives.izguwlyy4t.wasm": "sha256-fuUFR4Vt8MMaX81++Ei8Ua1fCByU26lFuUUv/lCFHaM=",
171
171
  "System.Security.Cryptography.81im1fetsl.wasm": "sha256-zGHZkz4c8Pkej/bNfeL9IhQprXbpeExSoKDsoU9kEhY=",
172
172
  "System.Text.Encodings.Web.xu4vg14f8l.wasm": "sha256-Wd7opd7hUMB8t8f03fJ8OFx8Zy90mxhXdPoogyxlLeg=",
173
- "System.Text.Json.rm38f7de5e.wasm": "sha256-nQAXFe6PQEO2h3okzCqctvz8f2loPQ9Wyp2ut9/pdmE=",
173
+ "System.Text.Json.tz7oagugff.wasm": "sha256-h1chvN2pMtrs3sZ+8HgPVlTkQZv7idpqIWanMF18jWM=",
174
174
  "System.Text.RegularExpressions.zuttf5ml29.wasm": "sha256-lYA4CMe6z32NqKw3KqMhKpVh7n3RxMKMDwvcuQ44foA=",
175
175
  "System.t8xd33e5pv.wasm": "sha256-jdi196RMQvJqOZVnwRK7DGSWJifChhgNljcOjGeHSUY=",
176
176
  "System.Xml.Linq.mglmvb8jto.wasm": "sha256-JuEj9dfBl39fqnbzXBS6GXngjNI7jj2ZEY6HaVcdW4U="
Binary file
Binary file
@@ -0,0 +1,124 @@
1
+ export interface ErrorInfo {
2
+ code?: string;
3
+ message?: string;
4
+ source?: string;
5
+ httpStatus?: number;
6
+ requestId?: string;
7
+ correlationId?: string;
8
+ traceParent?: string;
9
+ detail?: string;
10
+ }
11
+
12
+ export interface OperationResult<T> {
13
+ ok: boolean;
14
+ data?: T | null;
15
+ error?: ErrorInfo | null;
16
+ callId?: string | null;
17
+ }
18
+
19
+ export interface CreateItemResponse {
20
+ itemId: string;
21
+ }
22
+
23
+ export type JsonPrimitive = string | number | boolean | null;
24
+ export type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };
25
+
26
+ export interface OptionValueInfo {
27
+ valueString?: string | null;
28
+ valueNumeric?: number | null;
29
+ }
30
+
31
+ export interface OptionInfo {
32
+ maker?: string | null;
33
+ code?: string | null;
34
+ type?: string | null;
35
+ description?: string | null;
36
+ valueString?: string | null;
37
+ valueNumeric?: number | null;
38
+ hidden: boolean;
39
+ values?: OptionValueInfo[] | null;
40
+ }
41
+
42
+ export interface OptionList {
43
+ name?: string | null;
44
+ childs?: OptionList[] | null;
45
+ options?: OptionInfo[] | null;
46
+ }
47
+
48
+ export interface EnhancedOptionInfo extends OptionInfo {
49
+ partitionPart?: string | null;
50
+ order: number;
51
+ tab?: string | null;
52
+ section?: string | null;
53
+ widget?: string | null;
54
+ }
55
+
56
+ export interface EnhancedOptionList {
57
+ name?: string | null;
58
+ options?: EnhancedOptionInfo[] | null;
59
+ }
60
+
61
+ export interface DimensionsResponse {
62
+ totalL?: number | null;
63
+ totalA?: number | null;
64
+ values?: Record<string, number>;
65
+ valuesText?: Record<string, string>;
66
+ lLabels?: string[];
67
+ aLabels?: string[];
68
+ lCount?: number;
69
+ aCount?: number;
70
+ }
71
+
72
+ export interface SetDimensionsResponse {
73
+ rawResults?: Array<boolean | null>;
74
+ succeeded?: boolean | null;
75
+ status?: string | null;
76
+ message?: string | null;
77
+ }
78
+
79
+ export interface SetOptionValueResponse {
80
+ succeeded?: boolean | null;
81
+ status?: string | null;
82
+ message?: string | null;
83
+ }
84
+
85
+ export interface Scene {
86
+ maker: string;
87
+ name: string;
88
+ format: string;
89
+ uri: string;
90
+ configFile: string;
91
+ dbMaterialsId: string;
92
+ wallDatas: Array<Record<string, JsonValue>>;
93
+ }
94
+
95
+ export interface JsInteropApiRaw {
96
+ InitializeFromEnvJson(json: string): void;
97
+ GetOptions<T = EnhancedOptionList>(): Promise<OperationResult<T> | string>;
98
+ UpdateOptions<T = EnhancedOptionList>(optionListJson: string): Promise<OperationResult<T> | string>;
99
+ CreateItem<T = CreateItemResponse>(modelCode: string, isPersistable: boolean): Promise<OperationResult<T> | string>;
100
+ GetDimensions<T = DimensionsResponse>(modelId: string): Promise<OperationResult<T> | string>;
101
+ SetDimensions<T = SetDimensionsResponse>(modelId: string, dimensionName: string, dimensionValue: number): Promise<OperationResult<T> | string>;
102
+ SetOption<T = SetOptionValueResponse>(modelId: string, optionName: string, optionValue: string): Promise<OperationResult<T> | string>;
103
+ GetModelOptions<T = OptionInfo[]>(modelId: string): Promise<OperationResult<T> | string>;
104
+ GetScene<T = Scene>(): Promise<OperationResult<T> | string>;
105
+ GetModelAssetDataUrlAsync(modelId: string, modelImageConfigJson: string): Promise<OperationResult<string> | string>;
106
+ GetModelImage(modelId: string, modelImageConfigJson: string, sceneName?: string): Promise<OperationResult<string> | string>;
107
+ [key: string]: unknown;
108
+ }
109
+
110
+ export type RawOperation<T = JsonValue> = OperationResult<T> | string | null | undefined;
111
+
112
+ export function parse<T = JsonValue>(raw: RawOperation<T>): OperationResult<T>;
113
+ export function ensureOk<T = JsonValue>(raw: RawOperation<T>): T;
114
+
115
+ type AwaitedReturn<T> = T extends Promise<infer R> ? R : T;
116
+ type ExtractData<R> = AwaitedReturn<R> extends OperationResult<infer D> ? D : JsonValue;
117
+ type BoundMethod<F> = F extends (...args: infer A) => Promise<infer R>
118
+ ? (...args: A) => Promise<ExtractData<R>>
119
+ : F;
120
+ export type BoundApi<TRaw> = {
121
+ [K in keyof TRaw]: TRaw[K] extends Function ? BoundMethod<TRaw[K]> : TRaw[K];
122
+ };
123
+
124
+ export function bindApi<TRaw extends JsInteropApiRaw>(rawApi: TRaw): BoundApi<TRaw>;
@@ -0,0 +1,44 @@
1
+ // Helper utilities to deal with the OperationResult envelope returned by the WASM interop.
2
+ // - ensureOk(raw) -> returns the data payload or throws an Error enriched with error codes and callId.
3
+ // - bindApi(exportsAsm.PrefConfigurator.Wasm.JsInteropApi) -> proxy that auto-unwraps data for you.
4
+
5
+ export function parse(raw) {
6
+ if (raw === undefined || raw === null || raw === "") throw new Error("Empty response from WASM interop.");
7
+ if (typeof raw === "string") {
8
+ try {
9
+ return JSON.parse(raw);
10
+ } catch (e) {
11
+ throw new Error("Malformed JSON from WASM interop.");
12
+ }
13
+ }
14
+ return raw;
15
+ }
16
+
17
+ export function ensureOk(raw) {
18
+ const res = parse(raw);
19
+ const ok = res?.ok ?? res?.Ok;
20
+ if (ok) return res?.data ?? res?.Data ?? null;
21
+
22
+ const errObj = res?.error ?? res?.Error;
23
+ const err = new Error(errObj?.message || "Operation failed.");
24
+ err.code = errObj?.code;
25
+ err.source = errObj?.source;
26
+ err.httpStatus = errObj?.httpStatus;
27
+ err.requestId = errObj?.requestId;
28
+ err.correlationId = errObj?.correlationId;
29
+ err.traceParent = errObj?.traceParent;
30
+ err.detail = errObj?.detail;
31
+ err.callId = res?.callId ?? res?.CallId;
32
+ err.result = res;
33
+ throw err;
34
+ }
35
+
36
+ export function bindApi(rawApi) {
37
+ return new Proxy(rawApi, {
38
+ get(target, prop) {
39
+ const value = target[prop];
40
+ if (typeof value !== "function") return value;
41
+ return async (...args) => ensureOk(await value(...args));
42
+ }
43
+ });
44
+ }
package/package.json CHANGED
@@ -3,10 +3,11 @@
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": "0.2.6",
6
+ "version": "1.0.0-2",
7
7
  "files": [
8
8
  "_framework/**",
9
9
  "**/*.js",
10
+ "**/*.d.ts",
10
11
  "index.html",
11
12
  "README.md"
12
13
  ],