@offenedatenmodellierung/data-modelling-sdk 1.14.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/LICENSE +21 -0
- package/README.md +457 -0
- package/data_modelling_sdk.d.ts +1348 -0
- package/data_modelling_sdk.js +3773 -0
- package/data_modelling_sdk_bg.wasm +0 -0
- package/package.json +35 -0
|
@@ -0,0 +1,3773 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
|
|
3
|
+
function addToExternrefTable0(obj) {
|
|
4
|
+
const idx = wasm.__externref_table_alloc();
|
|
5
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
6
|
+
return idx;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
10
|
+
? { register: () => {}, unregister: () => {} }
|
|
11
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
12
|
+
|
|
13
|
+
function debugString(val) {
|
|
14
|
+
// primitive types
|
|
15
|
+
const type = typeof val;
|
|
16
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
17
|
+
return `${val}`;
|
|
18
|
+
}
|
|
19
|
+
if (type == 'string') {
|
|
20
|
+
return `"${val}"`;
|
|
21
|
+
}
|
|
22
|
+
if (type == 'symbol') {
|
|
23
|
+
const description = val.description;
|
|
24
|
+
if (description == null) {
|
|
25
|
+
return 'Symbol';
|
|
26
|
+
} else {
|
|
27
|
+
return `Symbol(${description})`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (type == 'function') {
|
|
31
|
+
const name = val.name;
|
|
32
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
33
|
+
return `Function(${name})`;
|
|
34
|
+
} else {
|
|
35
|
+
return 'Function';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// objects
|
|
39
|
+
if (Array.isArray(val)) {
|
|
40
|
+
const length = val.length;
|
|
41
|
+
let debug = '[';
|
|
42
|
+
if (length > 0) {
|
|
43
|
+
debug += debugString(val[0]);
|
|
44
|
+
}
|
|
45
|
+
for(let i = 1; i < length; i++) {
|
|
46
|
+
debug += ', ' + debugString(val[i]);
|
|
47
|
+
}
|
|
48
|
+
debug += ']';
|
|
49
|
+
return debug;
|
|
50
|
+
}
|
|
51
|
+
// Test for built-in
|
|
52
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
53
|
+
let className;
|
|
54
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
55
|
+
className = builtInMatches[1];
|
|
56
|
+
} else {
|
|
57
|
+
// Failed to match the standard '[object ClassName]'
|
|
58
|
+
return toString.call(val);
|
|
59
|
+
}
|
|
60
|
+
if (className == 'Object') {
|
|
61
|
+
// we're a user defined class or Object
|
|
62
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
63
|
+
// easier than looping through ownProperties of `val`.
|
|
64
|
+
try {
|
|
65
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
66
|
+
} catch (_) {
|
|
67
|
+
return 'Object';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// errors
|
|
71
|
+
if (val instanceof Error) {
|
|
72
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
73
|
+
}
|
|
74
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
75
|
+
return className;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
79
|
+
ptr = ptr >>> 0;
|
|
80
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let cachedDataViewMemory0 = null;
|
|
84
|
+
function getDataViewMemory0() {
|
|
85
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
86
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
87
|
+
}
|
|
88
|
+
return cachedDataViewMemory0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function getStringFromWasm0(ptr, len) {
|
|
92
|
+
ptr = ptr >>> 0;
|
|
93
|
+
return decodeText(ptr, len);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let cachedUint8ArrayMemory0 = null;
|
|
97
|
+
function getUint8ArrayMemory0() {
|
|
98
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
99
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
100
|
+
}
|
|
101
|
+
return cachedUint8ArrayMemory0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function handleError(f, args) {
|
|
105
|
+
try {
|
|
106
|
+
return f.apply(this, args);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
const idx = addToExternrefTable0(e);
|
|
109
|
+
wasm.__wbindgen_exn_store(idx);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function isLikeNone(x) {
|
|
114
|
+
return x === undefined || x === null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
118
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
119
|
+
const real = (...args) => {
|
|
120
|
+
|
|
121
|
+
// First up with a closure we increment the internal reference
|
|
122
|
+
// count. This ensures that the Rust closure environment won't
|
|
123
|
+
// be deallocated while we're invoking it.
|
|
124
|
+
state.cnt++;
|
|
125
|
+
const a = state.a;
|
|
126
|
+
state.a = 0;
|
|
127
|
+
try {
|
|
128
|
+
return f(a, state.b, ...args);
|
|
129
|
+
} finally {
|
|
130
|
+
state.a = a;
|
|
131
|
+
real._wbg_cb_unref();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
real._wbg_cb_unref = () => {
|
|
135
|
+
if (--state.cnt === 0) {
|
|
136
|
+
state.dtor(state.a, state.b);
|
|
137
|
+
state.a = 0;
|
|
138
|
+
CLOSURE_DTORS.unregister(state);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
142
|
+
return real;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
146
|
+
if (realloc === undefined) {
|
|
147
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
148
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
149
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
150
|
+
WASM_VECTOR_LEN = buf.length;
|
|
151
|
+
return ptr;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
let len = arg.length;
|
|
155
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
156
|
+
|
|
157
|
+
const mem = getUint8ArrayMemory0();
|
|
158
|
+
|
|
159
|
+
let offset = 0;
|
|
160
|
+
|
|
161
|
+
for (; offset < len; offset++) {
|
|
162
|
+
const code = arg.charCodeAt(offset);
|
|
163
|
+
if (code > 0x7F) break;
|
|
164
|
+
mem[ptr + offset] = code;
|
|
165
|
+
}
|
|
166
|
+
if (offset !== len) {
|
|
167
|
+
if (offset !== 0) {
|
|
168
|
+
arg = arg.slice(offset);
|
|
169
|
+
}
|
|
170
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
171
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
172
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
173
|
+
|
|
174
|
+
offset += ret.written;
|
|
175
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
WASM_VECTOR_LEN = offset;
|
|
179
|
+
return ptr;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function takeFromExternrefTable0(idx) {
|
|
183
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
184
|
+
wasm.__externref_table_dealloc(idx);
|
|
185
|
+
return value;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
189
|
+
cachedTextDecoder.decode();
|
|
190
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
191
|
+
let numBytesDecoded = 0;
|
|
192
|
+
function decodeText(ptr, len) {
|
|
193
|
+
numBytesDecoded += len;
|
|
194
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
195
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
196
|
+
cachedTextDecoder.decode();
|
|
197
|
+
numBytesDecoded = len;
|
|
198
|
+
}
|
|
199
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const cachedTextEncoder = new TextEncoder();
|
|
203
|
+
|
|
204
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
205
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
206
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
207
|
+
view.set(buf);
|
|
208
|
+
return {
|
|
209
|
+
read: arg.length,
|
|
210
|
+
written: buf.length
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
let WASM_VECTOR_LEN = 0;
|
|
216
|
+
|
|
217
|
+
function wasm_bindgen__convert__closures________invoke__h569a0d47881447ee(arg0, arg1, arg2) {
|
|
218
|
+
wasm.wasm_bindgen__convert__closures________invoke__h569a0d47881447ee(arg0, arg1, arg2);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function wasm_bindgen__convert__closures_____invoke__h3aa4f50d9cb64e36(arg0, arg1, arg2) {
|
|
222
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h3aa4f50d9cb64e36(arg0, arg1, arg2);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function wasm_bindgen__convert__closures_____invoke__h7a1f4b234d01e50d(arg0, arg1, arg2, arg3) {
|
|
226
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h7a1f4b234d01e50d(arg0, arg1, arg2, arg3);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Add an article to a knowledge index.
|
|
233
|
+
*
|
|
234
|
+
* # Arguments
|
|
235
|
+
*
|
|
236
|
+
* * `index_json` - JSON string containing KnowledgeIndex
|
|
237
|
+
* * `article_json` - JSON string containing KnowledgeArticle
|
|
238
|
+
* * `filename` - Filename for the article YAML file
|
|
239
|
+
*
|
|
240
|
+
* # Returns
|
|
241
|
+
*
|
|
242
|
+
* JSON string containing updated KnowledgeIndex, or JsValue error
|
|
243
|
+
* @param {string} index_json
|
|
244
|
+
* @param {string} article_json
|
|
245
|
+
* @param {string} filename
|
|
246
|
+
* @returns {string}
|
|
247
|
+
*/
|
|
248
|
+
export function add_article_to_knowledge_index(index_json, article_json, filename) {
|
|
249
|
+
let deferred5_0;
|
|
250
|
+
let deferred5_1;
|
|
251
|
+
try {
|
|
252
|
+
const ptr0 = passStringToWasm0(index_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
+
const len0 = WASM_VECTOR_LEN;
|
|
254
|
+
const ptr1 = passStringToWasm0(article_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
255
|
+
const len1 = WASM_VECTOR_LEN;
|
|
256
|
+
const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
257
|
+
const len2 = WASM_VECTOR_LEN;
|
|
258
|
+
const ret = wasm.add_article_to_knowledge_index(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
259
|
+
var ptr4 = ret[0];
|
|
260
|
+
var len4 = ret[1];
|
|
261
|
+
if (ret[3]) {
|
|
262
|
+
ptr4 = 0; len4 = 0;
|
|
263
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
264
|
+
}
|
|
265
|
+
deferred5_0 = ptr4;
|
|
266
|
+
deferred5_1 = len4;
|
|
267
|
+
return getStringFromWasm0(ptr4, len4);
|
|
268
|
+
} finally {
|
|
269
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Add a CADS node to a domain in a DataModel.
|
|
275
|
+
*
|
|
276
|
+
* # Arguments
|
|
277
|
+
*
|
|
278
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
279
|
+
* * `domain_id` - Domain UUID as string
|
|
280
|
+
* * `node_json` - JSON string containing CADSNode
|
|
281
|
+
*
|
|
282
|
+
* # Returns
|
|
283
|
+
*
|
|
284
|
+
* JSON string containing updated DataModel, or JsValue error
|
|
285
|
+
* @param {string} workspace_json
|
|
286
|
+
* @param {string} domain_id
|
|
287
|
+
* @param {string} node_json
|
|
288
|
+
* @returns {string}
|
|
289
|
+
*/
|
|
290
|
+
export function add_cads_node_to_domain(workspace_json, domain_id, node_json) {
|
|
291
|
+
let deferred5_0;
|
|
292
|
+
let deferred5_1;
|
|
293
|
+
try {
|
|
294
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len0 = WASM_VECTOR_LEN;
|
|
296
|
+
const ptr1 = passStringToWasm0(domain_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
297
|
+
const len1 = WASM_VECTOR_LEN;
|
|
298
|
+
const ptr2 = passStringToWasm0(node_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
299
|
+
const len2 = WASM_VECTOR_LEN;
|
|
300
|
+
const ret = wasm.add_cads_node_to_domain(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
301
|
+
var ptr4 = ret[0];
|
|
302
|
+
var len4 = ret[1];
|
|
303
|
+
if (ret[3]) {
|
|
304
|
+
ptr4 = 0; len4 = 0;
|
|
305
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
306
|
+
}
|
|
307
|
+
deferred5_0 = ptr4;
|
|
308
|
+
deferred5_1 = len4;
|
|
309
|
+
return getStringFromWasm0(ptr4, len4);
|
|
310
|
+
} finally {
|
|
311
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Add a decision to an index.
|
|
317
|
+
*
|
|
318
|
+
* # Arguments
|
|
319
|
+
*
|
|
320
|
+
* * `index_json` - JSON string containing DecisionIndex
|
|
321
|
+
* * `decision_json` - JSON string containing Decision
|
|
322
|
+
* * `filename` - Filename for the decision YAML file
|
|
323
|
+
*
|
|
324
|
+
* # Returns
|
|
325
|
+
*
|
|
326
|
+
* JSON string containing updated DecisionIndex, or JsValue error
|
|
327
|
+
* @param {string} index_json
|
|
328
|
+
* @param {string} decision_json
|
|
329
|
+
* @param {string} filename
|
|
330
|
+
* @returns {string}
|
|
331
|
+
*/
|
|
332
|
+
export function add_decision_to_index(index_json, decision_json, filename) {
|
|
333
|
+
let deferred5_0;
|
|
334
|
+
let deferred5_1;
|
|
335
|
+
try {
|
|
336
|
+
const ptr0 = passStringToWasm0(index_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
337
|
+
const len0 = WASM_VECTOR_LEN;
|
|
338
|
+
const ptr1 = passStringToWasm0(decision_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
339
|
+
const len1 = WASM_VECTOR_LEN;
|
|
340
|
+
const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
341
|
+
const len2 = WASM_VECTOR_LEN;
|
|
342
|
+
const ret = wasm.add_decision_to_index(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
343
|
+
var ptr4 = ret[0];
|
|
344
|
+
var len4 = ret[1];
|
|
345
|
+
if (ret[3]) {
|
|
346
|
+
ptr4 = 0; len4 = 0;
|
|
347
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
348
|
+
}
|
|
349
|
+
deferred5_0 = ptr4;
|
|
350
|
+
deferred5_1 = len4;
|
|
351
|
+
return getStringFromWasm0(ptr4, len4);
|
|
352
|
+
} finally {
|
|
353
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Add a domain reference to a workspace.
|
|
359
|
+
*
|
|
360
|
+
* # Arguments
|
|
361
|
+
*
|
|
362
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
363
|
+
* * `domain_id` - Domain UUID as string
|
|
364
|
+
* * `domain_name` - Domain name
|
|
365
|
+
*
|
|
366
|
+
* # Returns
|
|
367
|
+
*
|
|
368
|
+
* JSON string containing updated Workspace, or JsValue error
|
|
369
|
+
* @param {string} workspace_json
|
|
370
|
+
* @param {string} domain_id
|
|
371
|
+
* @param {string} domain_name
|
|
372
|
+
* @returns {string}
|
|
373
|
+
*/
|
|
374
|
+
export function add_domain_to_workspace(workspace_json, domain_id, domain_name) {
|
|
375
|
+
let deferred5_0;
|
|
376
|
+
let deferred5_1;
|
|
377
|
+
try {
|
|
378
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
379
|
+
const len0 = WASM_VECTOR_LEN;
|
|
380
|
+
const ptr1 = passStringToWasm0(domain_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
381
|
+
const len1 = WASM_VECTOR_LEN;
|
|
382
|
+
const ptr2 = passStringToWasm0(domain_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
383
|
+
const len2 = WASM_VECTOR_LEN;
|
|
384
|
+
const ret = wasm.add_domain_to_workspace(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
385
|
+
var ptr4 = ret[0];
|
|
386
|
+
var len4 = ret[1];
|
|
387
|
+
if (ret[3]) {
|
|
388
|
+
ptr4 = 0; len4 = 0;
|
|
389
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
390
|
+
}
|
|
391
|
+
deferred5_0 = ptr4;
|
|
392
|
+
deferred5_1 = len4;
|
|
393
|
+
return getStringFromWasm0(ptr4, len4);
|
|
394
|
+
} finally {
|
|
395
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Add an entity reference to a domain config.
|
|
401
|
+
*
|
|
402
|
+
* # Arguments
|
|
403
|
+
*
|
|
404
|
+
* * `config_json` - JSON string containing DomainConfig
|
|
405
|
+
* * `entity_type` - Entity type: "system", "table", "product", "asset", "process", "decision"
|
|
406
|
+
* * `entity_id` - Entity UUID as string
|
|
407
|
+
*
|
|
408
|
+
* # Returns
|
|
409
|
+
*
|
|
410
|
+
* JSON string containing updated DomainConfig, or JsValue error
|
|
411
|
+
* @param {string} config_json
|
|
412
|
+
* @param {string} entity_type
|
|
413
|
+
* @param {string} entity_id
|
|
414
|
+
* @returns {string}
|
|
415
|
+
*/
|
|
416
|
+
export function add_entity_to_domain_config(config_json, entity_type, entity_id) {
|
|
417
|
+
let deferred5_0;
|
|
418
|
+
let deferred5_1;
|
|
419
|
+
try {
|
|
420
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
421
|
+
const len0 = WASM_VECTOR_LEN;
|
|
422
|
+
const ptr1 = passStringToWasm0(entity_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
+
const len1 = WASM_VECTOR_LEN;
|
|
424
|
+
const ptr2 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
|
+
const len2 = WASM_VECTOR_LEN;
|
|
426
|
+
const ret = wasm.add_entity_to_domain_config(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
427
|
+
var ptr4 = ret[0];
|
|
428
|
+
var len4 = ret[1];
|
|
429
|
+
if (ret[3]) {
|
|
430
|
+
ptr4 = 0; len4 = 0;
|
|
431
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
432
|
+
}
|
|
433
|
+
deferred5_0 = ptr4;
|
|
434
|
+
deferred5_1 = len4;
|
|
435
|
+
return getStringFromWasm0(ptr4, len4);
|
|
436
|
+
} finally {
|
|
437
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Add an ODCS node to a domain in a DataModel.
|
|
443
|
+
*
|
|
444
|
+
* # Arguments
|
|
445
|
+
*
|
|
446
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
447
|
+
* * `domain_id` - Domain UUID as string
|
|
448
|
+
* * `node_json` - JSON string containing ODCSNode
|
|
449
|
+
*
|
|
450
|
+
* # Returns
|
|
451
|
+
*
|
|
452
|
+
* JSON string containing updated DataModel, or JsValue error
|
|
453
|
+
* @param {string} workspace_json
|
|
454
|
+
* @param {string} domain_id
|
|
455
|
+
* @param {string} node_json
|
|
456
|
+
* @returns {string}
|
|
457
|
+
*/
|
|
458
|
+
export function add_odcs_node_to_domain(workspace_json, domain_id, node_json) {
|
|
459
|
+
let deferred5_0;
|
|
460
|
+
let deferred5_1;
|
|
461
|
+
try {
|
|
462
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
463
|
+
const len0 = WASM_VECTOR_LEN;
|
|
464
|
+
const ptr1 = passStringToWasm0(domain_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
465
|
+
const len1 = WASM_VECTOR_LEN;
|
|
466
|
+
const ptr2 = passStringToWasm0(node_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
467
|
+
const len2 = WASM_VECTOR_LEN;
|
|
468
|
+
const ret = wasm.add_odcs_node_to_domain(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
469
|
+
var ptr4 = ret[0];
|
|
470
|
+
var len4 = ret[1];
|
|
471
|
+
if (ret[3]) {
|
|
472
|
+
ptr4 = 0; len4 = 0;
|
|
473
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
474
|
+
}
|
|
475
|
+
deferred5_0 = ptr4;
|
|
476
|
+
deferred5_1 = len4;
|
|
477
|
+
return getStringFromWasm0(ptr4, len4);
|
|
478
|
+
} finally {
|
|
479
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Add a relationship to a workspace.
|
|
485
|
+
*
|
|
486
|
+
* # Arguments
|
|
487
|
+
*
|
|
488
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
489
|
+
* * `relationship_json` - JSON string containing Relationship
|
|
490
|
+
*
|
|
491
|
+
* # Returns
|
|
492
|
+
*
|
|
493
|
+
* JSON string containing updated Workspace, or JsValue error
|
|
494
|
+
* @param {string} workspace_json
|
|
495
|
+
* @param {string} relationship_json
|
|
496
|
+
* @returns {string}
|
|
497
|
+
*/
|
|
498
|
+
export function add_relationship_to_workspace(workspace_json, relationship_json) {
|
|
499
|
+
let deferred4_0;
|
|
500
|
+
let deferred4_1;
|
|
501
|
+
try {
|
|
502
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
503
|
+
const len0 = WASM_VECTOR_LEN;
|
|
504
|
+
const ptr1 = passStringToWasm0(relationship_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
505
|
+
const len1 = WASM_VECTOR_LEN;
|
|
506
|
+
const ret = wasm.add_relationship_to_workspace(ptr0, len0, ptr1, len1);
|
|
507
|
+
var ptr3 = ret[0];
|
|
508
|
+
var len3 = ret[1];
|
|
509
|
+
if (ret[3]) {
|
|
510
|
+
ptr3 = 0; len3 = 0;
|
|
511
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
512
|
+
}
|
|
513
|
+
deferred4_0 = ptr3;
|
|
514
|
+
deferred4_1 = len3;
|
|
515
|
+
return getStringFromWasm0(ptr3, len3);
|
|
516
|
+
} finally {
|
|
517
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Add a system to a domain in a DataModel.
|
|
523
|
+
*
|
|
524
|
+
* # Arguments
|
|
525
|
+
*
|
|
526
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
527
|
+
* * `domain_id` - Domain UUID as string
|
|
528
|
+
* * `system_json` - JSON string containing System
|
|
529
|
+
*
|
|
530
|
+
* # Returns
|
|
531
|
+
*
|
|
532
|
+
* JSON string containing updated DataModel, or JsValue error
|
|
533
|
+
* @param {string} workspace_json
|
|
534
|
+
* @param {string} domain_id
|
|
535
|
+
* @param {string} system_json
|
|
536
|
+
* @returns {string}
|
|
537
|
+
*/
|
|
538
|
+
export function add_system_to_domain(workspace_json, domain_id, system_json) {
|
|
539
|
+
let deferred5_0;
|
|
540
|
+
let deferred5_1;
|
|
541
|
+
try {
|
|
542
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
543
|
+
const len0 = WASM_VECTOR_LEN;
|
|
544
|
+
const ptr1 = passStringToWasm0(domain_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
545
|
+
const len1 = WASM_VECTOR_LEN;
|
|
546
|
+
const ptr2 = passStringToWasm0(system_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
547
|
+
const len2 = WASM_VECTOR_LEN;
|
|
548
|
+
const ret = wasm.add_system_to_domain(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
549
|
+
var ptr4 = ret[0];
|
|
550
|
+
var len4 = ret[1];
|
|
551
|
+
if (ret[3]) {
|
|
552
|
+
ptr4 = 0; len4 = 0;
|
|
553
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
554
|
+
}
|
|
555
|
+
deferred5_0 = ptr4;
|
|
556
|
+
deferred5_1 = len4;
|
|
557
|
+
return getStringFromWasm0(ptr4, len4);
|
|
558
|
+
} finally {
|
|
559
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Analyze an OpenAPI component for conversion feasibility.
|
|
565
|
+
*
|
|
566
|
+
* # Arguments
|
|
567
|
+
*
|
|
568
|
+
* * `openapi_content` - OpenAPI YAML or JSON content as a string
|
|
569
|
+
* * `component_name` - Name of the schema component to analyze
|
|
570
|
+
*
|
|
571
|
+
* # Returns
|
|
572
|
+
*
|
|
573
|
+
* JSON string containing ConversionReport, or JsValue error
|
|
574
|
+
* @param {string} openapi_content
|
|
575
|
+
* @param {string} component_name
|
|
576
|
+
* @returns {string}
|
|
577
|
+
*/
|
|
578
|
+
export function analyze_openapi_conversion(openapi_content, component_name) {
|
|
579
|
+
let deferred4_0;
|
|
580
|
+
let deferred4_1;
|
|
581
|
+
try {
|
|
582
|
+
const ptr0 = passStringToWasm0(openapi_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
583
|
+
const len0 = WASM_VECTOR_LEN;
|
|
584
|
+
const ptr1 = passStringToWasm0(component_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
585
|
+
const len1 = WASM_VECTOR_LEN;
|
|
586
|
+
const ret = wasm.analyze_openapi_conversion(ptr0, len0, ptr1, len1);
|
|
587
|
+
var ptr3 = ret[0];
|
|
588
|
+
var len3 = ret[1];
|
|
589
|
+
if (ret[3]) {
|
|
590
|
+
ptr3 = 0; len3 = 0;
|
|
591
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
592
|
+
}
|
|
593
|
+
deferred4_0 = ptr3;
|
|
594
|
+
deferred4_1 = len3;
|
|
595
|
+
return getStringFromWasm0(ptr3, len3);
|
|
596
|
+
} finally {
|
|
597
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Check for circular dependencies in relationships.
|
|
603
|
+
*
|
|
604
|
+
* # Arguments
|
|
605
|
+
*
|
|
606
|
+
* * `relationships_json` - JSON string containing array of existing relationships
|
|
607
|
+
* * `source_table_id` - Source table ID (UUID string) of the new relationship
|
|
608
|
+
* * `target_table_id` - Target table ID (UUID string) of the new relationship
|
|
609
|
+
*
|
|
610
|
+
* # Returns
|
|
611
|
+
*
|
|
612
|
+
* JSON string with result: `{"has_cycle": true/false, "cycle_path": [...]}` or error
|
|
613
|
+
* @param {string} relationships_json
|
|
614
|
+
* @param {string} source_table_id
|
|
615
|
+
* @param {string} target_table_id
|
|
616
|
+
* @returns {string}
|
|
617
|
+
*/
|
|
618
|
+
export function check_circular_dependency(relationships_json, source_table_id, target_table_id) {
|
|
619
|
+
let deferred5_0;
|
|
620
|
+
let deferred5_1;
|
|
621
|
+
try {
|
|
622
|
+
const ptr0 = passStringToWasm0(relationships_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
623
|
+
const len0 = WASM_VECTOR_LEN;
|
|
624
|
+
const ptr1 = passStringToWasm0(source_table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
625
|
+
const len1 = WASM_VECTOR_LEN;
|
|
626
|
+
const ptr2 = passStringToWasm0(target_table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
627
|
+
const len2 = WASM_VECTOR_LEN;
|
|
628
|
+
const ret = wasm.check_circular_dependency(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
629
|
+
var ptr4 = ret[0];
|
|
630
|
+
var len4 = ret[1];
|
|
631
|
+
if (ret[3]) {
|
|
632
|
+
ptr4 = 0; len4 = 0;
|
|
633
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
634
|
+
}
|
|
635
|
+
deferred5_0 = ptr4;
|
|
636
|
+
deferred5_1 = len4;
|
|
637
|
+
return getStringFromWasm0(ptr4, len4);
|
|
638
|
+
} finally {
|
|
639
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Convert an OpenAPI schema component to an ODCS table.
|
|
645
|
+
*
|
|
646
|
+
* # Arguments
|
|
647
|
+
*
|
|
648
|
+
* * `openapi_content` - OpenAPI YAML or JSON content as a string
|
|
649
|
+
* * `component_name` - Name of the schema component to convert
|
|
650
|
+
* * `table_name` - Optional desired ODCS table name (uses component_name if None)
|
|
651
|
+
*
|
|
652
|
+
* # Returns
|
|
653
|
+
*
|
|
654
|
+
* JSON string containing ODCS Table, or JsValue error
|
|
655
|
+
* @param {string} openapi_content
|
|
656
|
+
* @param {string} component_name
|
|
657
|
+
* @param {string | null} [table_name]
|
|
658
|
+
* @returns {string}
|
|
659
|
+
*/
|
|
660
|
+
export function convert_openapi_to_odcs(openapi_content, component_name, table_name) {
|
|
661
|
+
let deferred5_0;
|
|
662
|
+
let deferred5_1;
|
|
663
|
+
try {
|
|
664
|
+
const ptr0 = passStringToWasm0(openapi_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
665
|
+
const len0 = WASM_VECTOR_LEN;
|
|
666
|
+
const ptr1 = passStringToWasm0(component_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
667
|
+
const len1 = WASM_VECTOR_LEN;
|
|
668
|
+
var ptr2 = isLikeNone(table_name) ? 0 : passStringToWasm0(table_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
669
|
+
var len2 = WASM_VECTOR_LEN;
|
|
670
|
+
const ret = wasm.convert_openapi_to_odcs(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
671
|
+
var ptr4 = ret[0];
|
|
672
|
+
var len4 = ret[1];
|
|
673
|
+
if (ret[3]) {
|
|
674
|
+
ptr4 = 0; len4 = 0;
|
|
675
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
676
|
+
}
|
|
677
|
+
deferred5_0 = ptr4;
|
|
678
|
+
deferred5_1 = len4;
|
|
679
|
+
return getStringFromWasm0(ptr4, len4);
|
|
680
|
+
} finally {
|
|
681
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Convert any format to ODCS v3.1.0 YAML format.
|
|
687
|
+
*
|
|
688
|
+
* # Arguments
|
|
689
|
+
*
|
|
690
|
+
* * `input` - Format-specific content as a string
|
|
691
|
+
* * `format` - Optional format identifier. If None, attempts auto-detection.
|
|
692
|
+
* Supported formats: "sql", "json_schema", "avro", "protobuf", "odcl", "odcs", "cads", "odps", "domain"
|
|
693
|
+
*
|
|
694
|
+
* # Returns
|
|
695
|
+
*
|
|
696
|
+
* ODCS v3.1.0 YAML string, or JsValue error
|
|
697
|
+
* @param {string} input
|
|
698
|
+
* @param {string | null} [format]
|
|
699
|
+
* @returns {string}
|
|
700
|
+
*/
|
|
701
|
+
export function convert_to_odcs(input, format) {
|
|
702
|
+
let deferred4_0;
|
|
703
|
+
let deferred4_1;
|
|
704
|
+
try {
|
|
705
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
706
|
+
const len0 = WASM_VECTOR_LEN;
|
|
707
|
+
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
708
|
+
var len1 = WASM_VECTOR_LEN;
|
|
709
|
+
const ret = wasm.convert_to_odcs(ptr0, len0, ptr1, len1);
|
|
710
|
+
var ptr3 = ret[0];
|
|
711
|
+
var len3 = ret[1];
|
|
712
|
+
if (ret[3]) {
|
|
713
|
+
ptr3 = 0; len3 = 0;
|
|
714
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
715
|
+
}
|
|
716
|
+
deferred4_0 = ptr3;
|
|
717
|
+
deferred4_1 = len3;
|
|
718
|
+
return getStringFromWasm0(ptr3, len3);
|
|
719
|
+
} finally {
|
|
720
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Create a new decision with required fields.
|
|
726
|
+
*
|
|
727
|
+
* # Arguments
|
|
728
|
+
*
|
|
729
|
+
* * `number` - Decision number (ADR-0001, ADR-0002, etc.)
|
|
730
|
+
* * `title` - Short title describing the decision
|
|
731
|
+
* * `context` - Problem statement and context
|
|
732
|
+
* * `decision` - The decision that was made
|
|
733
|
+
*
|
|
734
|
+
* # Returns
|
|
735
|
+
*
|
|
736
|
+
* JSON string containing Decision, or JsValue error
|
|
737
|
+
* @param {number} number
|
|
738
|
+
* @param {string} title
|
|
739
|
+
* @param {string} context
|
|
740
|
+
* @param {string} decision
|
|
741
|
+
* @returns {string}
|
|
742
|
+
*/
|
|
743
|
+
export function create_decision(number, title, context, decision) {
|
|
744
|
+
let deferred5_0;
|
|
745
|
+
let deferred5_1;
|
|
746
|
+
try {
|
|
747
|
+
const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
748
|
+
const len0 = WASM_VECTOR_LEN;
|
|
749
|
+
const ptr1 = passStringToWasm0(context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
750
|
+
const len1 = WASM_VECTOR_LEN;
|
|
751
|
+
const ptr2 = passStringToWasm0(decision, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
752
|
+
const len2 = WASM_VECTOR_LEN;
|
|
753
|
+
const ret = wasm.create_decision(number, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
754
|
+
var ptr4 = ret[0];
|
|
755
|
+
var len4 = ret[1];
|
|
756
|
+
if (ret[3]) {
|
|
757
|
+
ptr4 = 0; len4 = 0;
|
|
758
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
759
|
+
}
|
|
760
|
+
deferred5_0 = ptr4;
|
|
761
|
+
deferred5_1 = len4;
|
|
762
|
+
return getStringFromWasm0(ptr4, len4);
|
|
763
|
+
} finally {
|
|
764
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Create a new empty decision index.
|
|
770
|
+
*
|
|
771
|
+
* # Returns
|
|
772
|
+
*
|
|
773
|
+
* JSON string containing DecisionIndex, or JsValue error
|
|
774
|
+
* @returns {string}
|
|
775
|
+
*/
|
|
776
|
+
export function create_decision_index() {
|
|
777
|
+
let deferred2_0;
|
|
778
|
+
let deferred2_1;
|
|
779
|
+
try {
|
|
780
|
+
const ret = wasm.create_decision_index();
|
|
781
|
+
var ptr1 = ret[0];
|
|
782
|
+
var len1 = ret[1];
|
|
783
|
+
if (ret[3]) {
|
|
784
|
+
ptr1 = 0; len1 = 0;
|
|
785
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
786
|
+
}
|
|
787
|
+
deferred2_0 = ptr1;
|
|
788
|
+
deferred2_1 = len1;
|
|
789
|
+
return getStringFromWasm0(ptr1, len1);
|
|
790
|
+
} finally {
|
|
791
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Create a new business domain.
|
|
797
|
+
*
|
|
798
|
+
* # Arguments
|
|
799
|
+
*
|
|
800
|
+
* * `name` - Domain name
|
|
801
|
+
*
|
|
802
|
+
* # Returns
|
|
803
|
+
*
|
|
804
|
+
* JSON string containing Domain, or JsValue error
|
|
805
|
+
* @param {string} name
|
|
806
|
+
* @returns {string}
|
|
807
|
+
*/
|
|
808
|
+
export function create_domain(name) {
|
|
809
|
+
let deferred3_0;
|
|
810
|
+
let deferred3_1;
|
|
811
|
+
try {
|
|
812
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
813
|
+
const len0 = WASM_VECTOR_LEN;
|
|
814
|
+
const ret = wasm.create_domain(ptr0, len0);
|
|
815
|
+
var ptr2 = ret[0];
|
|
816
|
+
var len2 = ret[1];
|
|
817
|
+
if (ret[3]) {
|
|
818
|
+
ptr2 = 0; len2 = 0;
|
|
819
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
820
|
+
}
|
|
821
|
+
deferred3_0 = ptr2;
|
|
822
|
+
deferred3_1 = len2;
|
|
823
|
+
return getStringFromWasm0(ptr2, len2);
|
|
824
|
+
} finally {
|
|
825
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Create a new domain configuration.
|
|
831
|
+
*
|
|
832
|
+
* # Arguments
|
|
833
|
+
*
|
|
834
|
+
* * `name` - Domain name
|
|
835
|
+
* * `workspace_id` - Workspace UUID as string
|
|
836
|
+
*
|
|
837
|
+
* # Returns
|
|
838
|
+
*
|
|
839
|
+
* JSON string containing DomainConfig, or JsValue error
|
|
840
|
+
* @param {string} name
|
|
841
|
+
* @param {string} workspace_id
|
|
842
|
+
* @returns {string}
|
|
843
|
+
*/
|
|
844
|
+
export function create_domain_config(name, workspace_id) {
|
|
845
|
+
let deferred4_0;
|
|
846
|
+
let deferred4_1;
|
|
847
|
+
try {
|
|
848
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
|
+
const len0 = WASM_VECTOR_LEN;
|
|
850
|
+
const ptr1 = passStringToWasm0(workspace_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
851
|
+
const len1 = WASM_VECTOR_LEN;
|
|
852
|
+
const ret = wasm.create_domain_config(ptr0, len0, ptr1, len1);
|
|
853
|
+
var ptr3 = ret[0];
|
|
854
|
+
var len3 = ret[1];
|
|
855
|
+
if (ret[3]) {
|
|
856
|
+
ptr3 = 0; len3 = 0;
|
|
857
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
858
|
+
}
|
|
859
|
+
deferred4_0 = ptr3;
|
|
860
|
+
deferred4_1 = len3;
|
|
861
|
+
return getStringFromWasm0(ptr3, len3);
|
|
862
|
+
} finally {
|
|
863
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Create a new knowledge article with required fields.
|
|
869
|
+
*
|
|
870
|
+
* # Arguments
|
|
871
|
+
*
|
|
872
|
+
* * `number` - Article number (1, 2, 3, etc. - will be formatted as KB-0001)
|
|
873
|
+
* * `title` - Article title
|
|
874
|
+
* * `summary` - Brief summary of the article
|
|
875
|
+
* * `content` - Full article content in Markdown
|
|
876
|
+
* * `author` - Article author (email or name)
|
|
877
|
+
*
|
|
878
|
+
* # Returns
|
|
879
|
+
*
|
|
880
|
+
* JSON string containing KnowledgeArticle, or JsValue error
|
|
881
|
+
* @param {number} number
|
|
882
|
+
* @param {string} title
|
|
883
|
+
* @param {string} summary
|
|
884
|
+
* @param {string} content
|
|
885
|
+
* @param {string} author
|
|
886
|
+
* @returns {string}
|
|
887
|
+
*/
|
|
888
|
+
export function create_knowledge_article(number, title, summary, content, author) {
|
|
889
|
+
let deferred6_0;
|
|
890
|
+
let deferred6_1;
|
|
891
|
+
try {
|
|
892
|
+
const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
893
|
+
const len0 = WASM_VECTOR_LEN;
|
|
894
|
+
const ptr1 = passStringToWasm0(summary, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
895
|
+
const len1 = WASM_VECTOR_LEN;
|
|
896
|
+
const ptr2 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
897
|
+
const len2 = WASM_VECTOR_LEN;
|
|
898
|
+
const ptr3 = passStringToWasm0(author, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
899
|
+
const len3 = WASM_VECTOR_LEN;
|
|
900
|
+
const ret = wasm.create_knowledge_article(number, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
901
|
+
var ptr5 = ret[0];
|
|
902
|
+
var len5 = ret[1];
|
|
903
|
+
if (ret[3]) {
|
|
904
|
+
ptr5 = 0; len5 = 0;
|
|
905
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
906
|
+
}
|
|
907
|
+
deferred6_0 = ptr5;
|
|
908
|
+
deferred6_1 = len5;
|
|
909
|
+
return getStringFromWasm0(ptr5, len5);
|
|
910
|
+
} finally {
|
|
911
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Create a new empty knowledge index.
|
|
917
|
+
*
|
|
918
|
+
* # Returns
|
|
919
|
+
*
|
|
920
|
+
* JSON string containing KnowledgeIndex, or JsValue error
|
|
921
|
+
* @returns {string}
|
|
922
|
+
*/
|
|
923
|
+
export function create_knowledge_index() {
|
|
924
|
+
let deferred2_0;
|
|
925
|
+
let deferred2_1;
|
|
926
|
+
try {
|
|
927
|
+
const ret = wasm.create_knowledge_index();
|
|
928
|
+
var ptr1 = ret[0];
|
|
929
|
+
var len1 = ret[1];
|
|
930
|
+
if (ret[3]) {
|
|
931
|
+
ptr1 = 0; len1 = 0;
|
|
932
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
933
|
+
}
|
|
934
|
+
deferred2_0 = ptr1;
|
|
935
|
+
deferred2_1 = len1;
|
|
936
|
+
return getStringFromWasm0(ptr1, len1);
|
|
937
|
+
} finally {
|
|
938
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Create a new workspace.
|
|
944
|
+
*
|
|
945
|
+
* # Arguments
|
|
946
|
+
*
|
|
947
|
+
* * `name` - Workspace name
|
|
948
|
+
* * `owner_id` - Owner UUID as string
|
|
949
|
+
*
|
|
950
|
+
* # Returns
|
|
951
|
+
*
|
|
952
|
+
* JSON string containing Workspace, or JsValue error
|
|
953
|
+
* @param {string} name
|
|
954
|
+
* @param {string} owner_id
|
|
955
|
+
* @returns {string}
|
|
956
|
+
*/
|
|
957
|
+
export function create_workspace(name, owner_id) {
|
|
958
|
+
let deferred4_0;
|
|
959
|
+
let deferred4_1;
|
|
960
|
+
try {
|
|
961
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
962
|
+
const len0 = WASM_VECTOR_LEN;
|
|
963
|
+
const ptr1 = passStringToWasm0(owner_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
964
|
+
const len1 = WASM_VECTOR_LEN;
|
|
965
|
+
const ret = wasm.create_workspace(ptr0, len0, ptr1, len1);
|
|
966
|
+
var ptr3 = ret[0];
|
|
967
|
+
var len3 = ret[1];
|
|
968
|
+
if (ret[3]) {
|
|
969
|
+
ptr3 = 0; len3 = 0;
|
|
970
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
971
|
+
}
|
|
972
|
+
deferred4_0 = ptr3;
|
|
973
|
+
deferred4_1 = len3;
|
|
974
|
+
return getStringFromWasm0(ptr3, len3);
|
|
975
|
+
} finally {
|
|
976
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Detect naming conflicts between existing and new tables.
|
|
982
|
+
*
|
|
983
|
+
* # Arguments
|
|
984
|
+
*
|
|
985
|
+
* * `existing_tables_json` - JSON string containing array of existing tables
|
|
986
|
+
* * `new_tables_json` - JSON string containing array of new tables
|
|
987
|
+
*
|
|
988
|
+
* # Returns
|
|
989
|
+
*
|
|
990
|
+
* JSON string containing array of naming conflicts
|
|
991
|
+
* @param {string} existing_tables_json
|
|
992
|
+
* @param {string} new_tables_json
|
|
993
|
+
* @returns {string}
|
|
994
|
+
*/
|
|
995
|
+
export function detect_naming_conflicts(existing_tables_json, new_tables_json) {
|
|
996
|
+
let deferred4_0;
|
|
997
|
+
let deferred4_1;
|
|
998
|
+
try {
|
|
999
|
+
const ptr0 = passStringToWasm0(existing_tables_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1000
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1001
|
+
const ptr1 = passStringToWasm0(new_tables_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1002
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1003
|
+
const ret = wasm.detect_naming_conflicts(ptr0, len0, ptr1, len1);
|
|
1004
|
+
var ptr3 = ret[0];
|
|
1005
|
+
var len3 = ret[1];
|
|
1006
|
+
if (ret[3]) {
|
|
1007
|
+
ptr3 = 0; len3 = 0;
|
|
1008
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1009
|
+
}
|
|
1010
|
+
deferred4_0 = ptr3;
|
|
1011
|
+
deferred4_1 = len3;
|
|
1012
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1013
|
+
} finally {
|
|
1014
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Export a decisions index to YAML format.
|
|
1020
|
+
*
|
|
1021
|
+
* # Arguments
|
|
1022
|
+
*
|
|
1023
|
+
* * `index_json` - JSON string containing DecisionIndex
|
|
1024
|
+
*
|
|
1025
|
+
* # Returns
|
|
1026
|
+
*
|
|
1027
|
+
* DecisionIndex YAML format string, or JsValue error
|
|
1028
|
+
* @param {string} index_json
|
|
1029
|
+
* @returns {string}
|
|
1030
|
+
*/
|
|
1031
|
+
export function export_decision_index_to_yaml(index_json) {
|
|
1032
|
+
let deferred3_0;
|
|
1033
|
+
let deferred3_1;
|
|
1034
|
+
try {
|
|
1035
|
+
const ptr0 = passStringToWasm0(index_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1036
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1037
|
+
const ret = wasm.export_decision_index_to_yaml(ptr0, len0);
|
|
1038
|
+
var ptr2 = ret[0];
|
|
1039
|
+
var len2 = ret[1];
|
|
1040
|
+
if (ret[3]) {
|
|
1041
|
+
ptr2 = 0; len2 = 0;
|
|
1042
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1043
|
+
}
|
|
1044
|
+
deferred3_0 = ptr2;
|
|
1045
|
+
deferred3_1 = len2;
|
|
1046
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1047
|
+
} finally {
|
|
1048
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Export a decision to branded Markdown format.
|
|
1054
|
+
*
|
|
1055
|
+
* # Arguments
|
|
1056
|
+
*
|
|
1057
|
+
* * `decision_json` - JSON string containing Decision
|
|
1058
|
+
* * `branding_json` - Optional JSON string containing MarkdownBrandingConfig
|
|
1059
|
+
*
|
|
1060
|
+
* # Returns
|
|
1061
|
+
*
|
|
1062
|
+
* Branded Markdown string, or JsValue error
|
|
1063
|
+
* @param {string} decision_json
|
|
1064
|
+
* @param {string | null} [branding_json]
|
|
1065
|
+
* @returns {string}
|
|
1066
|
+
*/
|
|
1067
|
+
export function export_decision_to_branded_markdown(decision_json, branding_json) {
|
|
1068
|
+
let deferred4_0;
|
|
1069
|
+
let deferred4_1;
|
|
1070
|
+
try {
|
|
1071
|
+
const ptr0 = passStringToWasm0(decision_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1072
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1073
|
+
var ptr1 = isLikeNone(branding_json) ? 0 : passStringToWasm0(branding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1074
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1075
|
+
const ret = wasm.export_decision_to_branded_markdown(ptr0, len0, ptr1, len1);
|
|
1076
|
+
var ptr3 = ret[0];
|
|
1077
|
+
var len3 = ret[1];
|
|
1078
|
+
if (ret[3]) {
|
|
1079
|
+
ptr3 = 0; len3 = 0;
|
|
1080
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1081
|
+
}
|
|
1082
|
+
deferred4_0 = ptr3;
|
|
1083
|
+
deferred4_1 = len3;
|
|
1084
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1085
|
+
} finally {
|
|
1086
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Export a decision to Markdown format (MADR template).
|
|
1092
|
+
*
|
|
1093
|
+
* # Arguments
|
|
1094
|
+
*
|
|
1095
|
+
* * `decision_json` - JSON string containing Decision
|
|
1096
|
+
*
|
|
1097
|
+
* # Returns
|
|
1098
|
+
*
|
|
1099
|
+
* Decision Markdown string, or JsValue error
|
|
1100
|
+
* @param {string} decision_json
|
|
1101
|
+
* @returns {string}
|
|
1102
|
+
*/
|
|
1103
|
+
export function export_decision_to_markdown(decision_json) {
|
|
1104
|
+
let deferred3_0;
|
|
1105
|
+
let deferred3_1;
|
|
1106
|
+
try {
|
|
1107
|
+
const ptr0 = passStringToWasm0(decision_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1108
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1109
|
+
const ret = wasm.export_decision_to_markdown(ptr0, len0);
|
|
1110
|
+
var ptr2 = ret[0];
|
|
1111
|
+
var len2 = ret[1];
|
|
1112
|
+
if (ret[3]) {
|
|
1113
|
+
ptr2 = 0; len2 = 0;
|
|
1114
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1115
|
+
}
|
|
1116
|
+
deferred3_0 = ptr2;
|
|
1117
|
+
deferred3_1 = len2;
|
|
1118
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1119
|
+
} finally {
|
|
1120
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Export a decision to PDF format with optional branding.
|
|
1126
|
+
*
|
|
1127
|
+
* # Arguments
|
|
1128
|
+
*
|
|
1129
|
+
* * `decision_json` - JSON string containing Decision
|
|
1130
|
+
* * `branding_json` - Optional JSON string containing BrandingConfig
|
|
1131
|
+
*
|
|
1132
|
+
* # Returns
|
|
1133
|
+
*
|
|
1134
|
+
* JSON string containing PdfExportResult (with base64-encoded PDF), or JsValue error
|
|
1135
|
+
* @param {string} decision_json
|
|
1136
|
+
* @param {string | null} [branding_json]
|
|
1137
|
+
* @returns {string}
|
|
1138
|
+
*/
|
|
1139
|
+
export function export_decision_to_pdf(decision_json, branding_json) {
|
|
1140
|
+
let deferred4_0;
|
|
1141
|
+
let deferred4_1;
|
|
1142
|
+
try {
|
|
1143
|
+
const ptr0 = passStringToWasm0(decision_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1144
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1145
|
+
var ptr1 = isLikeNone(branding_json) ? 0 : passStringToWasm0(branding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1146
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1147
|
+
const ret = wasm.export_decision_to_pdf(ptr0, len0, ptr1, len1);
|
|
1148
|
+
var ptr3 = ret[0];
|
|
1149
|
+
var len3 = ret[1];
|
|
1150
|
+
if (ret[3]) {
|
|
1151
|
+
ptr3 = 0; len3 = 0;
|
|
1152
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1153
|
+
}
|
|
1154
|
+
deferred4_0 = ptr3;
|
|
1155
|
+
deferred4_1 = len3;
|
|
1156
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1157
|
+
} finally {
|
|
1158
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Export a decision to YAML format.
|
|
1164
|
+
*
|
|
1165
|
+
* # Arguments
|
|
1166
|
+
*
|
|
1167
|
+
* * `decision_json` - JSON string containing Decision
|
|
1168
|
+
*
|
|
1169
|
+
* # Returns
|
|
1170
|
+
*
|
|
1171
|
+
* Decision YAML format string, or JsValue error
|
|
1172
|
+
* @param {string} decision_json
|
|
1173
|
+
* @returns {string}
|
|
1174
|
+
*/
|
|
1175
|
+
export function export_decision_to_yaml(decision_json) {
|
|
1176
|
+
let deferred3_0;
|
|
1177
|
+
let deferred3_1;
|
|
1178
|
+
try {
|
|
1179
|
+
const ptr0 = passStringToWasm0(decision_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1180
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1181
|
+
const ret = wasm.export_decision_to_yaml(ptr0, len0);
|
|
1182
|
+
var ptr2 = ret[0];
|
|
1183
|
+
var len2 = ret[1];
|
|
1184
|
+
if (ret[3]) {
|
|
1185
|
+
ptr2 = 0; len2 = 0;
|
|
1186
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1187
|
+
}
|
|
1188
|
+
deferred3_0 = ptr2;
|
|
1189
|
+
deferred3_1 = len2;
|
|
1190
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1191
|
+
} finally {
|
|
1192
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Export a domain config to YAML format.
|
|
1198
|
+
*
|
|
1199
|
+
* # Arguments
|
|
1200
|
+
*
|
|
1201
|
+
* * `config_json` - JSON string containing DomainConfig
|
|
1202
|
+
*
|
|
1203
|
+
* # Returns
|
|
1204
|
+
*
|
|
1205
|
+
* DomainConfig YAML format string, or JsValue error
|
|
1206
|
+
* @param {string} config_json
|
|
1207
|
+
* @returns {string}
|
|
1208
|
+
*/
|
|
1209
|
+
export function export_domain_config_to_yaml(config_json) {
|
|
1210
|
+
let deferred3_0;
|
|
1211
|
+
let deferred3_1;
|
|
1212
|
+
try {
|
|
1213
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1214
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1215
|
+
const ret = wasm.export_domain_config_to_yaml(ptr0, len0);
|
|
1216
|
+
var ptr2 = ret[0];
|
|
1217
|
+
var len2 = ret[1];
|
|
1218
|
+
if (ret[3]) {
|
|
1219
|
+
ptr2 = 0; len2 = 0;
|
|
1220
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1221
|
+
}
|
|
1222
|
+
deferred3_0 = ptr2;
|
|
1223
|
+
deferred3_1 = len2;
|
|
1224
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1225
|
+
} finally {
|
|
1226
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Export a knowledge index to YAML format.
|
|
1232
|
+
*
|
|
1233
|
+
* # Arguments
|
|
1234
|
+
*
|
|
1235
|
+
* * `index_json` - JSON string containing KnowledgeIndex
|
|
1236
|
+
*
|
|
1237
|
+
* # Returns
|
|
1238
|
+
*
|
|
1239
|
+
* KnowledgeIndex YAML format string, or JsValue error
|
|
1240
|
+
* @param {string} index_json
|
|
1241
|
+
* @returns {string}
|
|
1242
|
+
*/
|
|
1243
|
+
export function export_knowledge_index_to_yaml(index_json) {
|
|
1244
|
+
let deferred3_0;
|
|
1245
|
+
let deferred3_1;
|
|
1246
|
+
try {
|
|
1247
|
+
const ptr0 = passStringToWasm0(index_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1248
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1249
|
+
const ret = wasm.export_knowledge_index_to_yaml(ptr0, len0);
|
|
1250
|
+
var ptr2 = ret[0];
|
|
1251
|
+
var len2 = ret[1];
|
|
1252
|
+
if (ret[3]) {
|
|
1253
|
+
ptr2 = 0; len2 = 0;
|
|
1254
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1255
|
+
}
|
|
1256
|
+
deferred3_0 = ptr2;
|
|
1257
|
+
deferred3_1 = len2;
|
|
1258
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1259
|
+
} finally {
|
|
1260
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* Export a knowledge article to branded Markdown format.
|
|
1266
|
+
*
|
|
1267
|
+
* # Arguments
|
|
1268
|
+
*
|
|
1269
|
+
* * `article_json` - JSON string containing KnowledgeArticle
|
|
1270
|
+
* * `branding_json` - Optional JSON string containing MarkdownBrandingConfig
|
|
1271
|
+
*
|
|
1272
|
+
* # Returns
|
|
1273
|
+
*
|
|
1274
|
+
* Branded Markdown string, or JsValue error
|
|
1275
|
+
* @param {string} article_json
|
|
1276
|
+
* @param {string | null} [branding_json]
|
|
1277
|
+
* @returns {string}
|
|
1278
|
+
*/
|
|
1279
|
+
export function export_knowledge_to_branded_markdown(article_json, branding_json) {
|
|
1280
|
+
let deferred4_0;
|
|
1281
|
+
let deferred4_1;
|
|
1282
|
+
try {
|
|
1283
|
+
const ptr0 = passStringToWasm0(article_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1284
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1285
|
+
var ptr1 = isLikeNone(branding_json) ? 0 : passStringToWasm0(branding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1286
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1287
|
+
const ret = wasm.export_knowledge_to_branded_markdown(ptr0, len0, ptr1, len1);
|
|
1288
|
+
var ptr3 = ret[0];
|
|
1289
|
+
var len3 = ret[1];
|
|
1290
|
+
if (ret[3]) {
|
|
1291
|
+
ptr3 = 0; len3 = 0;
|
|
1292
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1293
|
+
}
|
|
1294
|
+
deferred4_0 = ptr3;
|
|
1295
|
+
deferred4_1 = len3;
|
|
1296
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1297
|
+
} finally {
|
|
1298
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Export a knowledge article to Markdown format.
|
|
1304
|
+
*
|
|
1305
|
+
* # Arguments
|
|
1306
|
+
*
|
|
1307
|
+
* * `article_json` - JSON string containing KnowledgeArticle
|
|
1308
|
+
*
|
|
1309
|
+
* # Returns
|
|
1310
|
+
*
|
|
1311
|
+
* KnowledgeArticle Markdown string, or JsValue error
|
|
1312
|
+
* @param {string} article_json
|
|
1313
|
+
* @returns {string}
|
|
1314
|
+
*/
|
|
1315
|
+
export function export_knowledge_to_markdown(article_json) {
|
|
1316
|
+
let deferred3_0;
|
|
1317
|
+
let deferred3_1;
|
|
1318
|
+
try {
|
|
1319
|
+
const ptr0 = passStringToWasm0(article_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1320
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1321
|
+
const ret = wasm.export_knowledge_to_markdown(ptr0, len0);
|
|
1322
|
+
var ptr2 = ret[0];
|
|
1323
|
+
var len2 = ret[1];
|
|
1324
|
+
if (ret[3]) {
|
|
1325
|
+
ptr2 = 0; len2 = 0;
|
|
1326
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1327
|
+
}
|
|
1328
|
+
deferred3_0 = ptr2;
|
|
1329
|
+
deferred3_1 = len2;
|
|
1330
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1331
|
+
} finally {
|
|
1332
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Export a knowledge article to PDF format with optional branding.
|
|
1338
|
+
*
|
|
1339
|
+
* # Arguments
|
|
1340
|
+
*
|
|
1341
|
+
* * `article_json` - JSON string containing KnowledgeArticle
|
|
1342
|
+
* * `branding_json` - Optional JSON string containing BrandingConfig
|
|
1343
|
+
*
|
|
1344
|
+
* # Returns
|
|
1345
|
+
*
|
|
1346
|
+
* JSON string containing PdfExportResult (with base64-encoded PDF), or JsValue error
|
|
1347
|
+
* @param {string} article_json
|
|
1348
|
+
* @param {string | null} [branding_json]
|
|
1349
|
+
* @returns {string}
|
|
1350
|
+
*/
|
|
1351
|
+
export function export_knowledge_to_pdf(article_json, branding_json) {
|
|
1352
|
+
let deferred4_0;
|
|
1353
|
+
let deferred4_1;
|
|
1354
|
+
try {
|
|
1355
|
+
const ptr0 = passStringToWasm0(article_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1356
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1357
|
+
var ptr1 = isLikeNone(branding_json) ? 0 : passStringToWasm0(branding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1358
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1359
|
+
const ret = wasm.export_knowledge_to_pdf(ptr0, len0, ptr1, len1);
|
|
1360
|
+
var ptr3 = ret[0];
|
|
1361
|
+
var len3 = ret[1];
|
|
1362
|
+
if (ret[3]) {
|
|
1363
|
+
ptr3 = 0; len3 = 0;
|
|
1364
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1365
|
+
}
|
|
1366
|
+
deferred4_0 = ptr3;
|
|
1367
|
+
deferred4_1 = len3;
|
|
1368
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1369
|
+
} finally {
|
|
1370
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Export a knowledge article to YAML format.
|
|
1376
|
+
*
|
|
1377
|
+
* # Arguments
|
|
1378
|
+
*
|
|
1379
|
+
* * `article_json` - JSON string containing KnowledgeArticle
|
|
1380
|
+
*
|
|
1381
|
+
* # Returns
|
|
1382
|
+
*
|
|
1383
|
+
* KnowledgeArticle YAML format string, or JsValue error
|
|
1384
|
+
* @param {string} article_json
|
|
1385
|
+
* @returns {string}
|
|
1386
|
+
*/
|
|
1387
|
+
export function export_knowledge_to_yaml(article_json) {
|
|
1388
|
+
let deferred3_0;
|
|
1389
|
+
let deferred3_1;
|
|
1390
|
+
try {
|
|
1391
|
+
const ptr0 = passStringToWasm0(article_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1392
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1393
|
+
const ret = wasm.export_knowledge_to_yaml(ptr0, len0);
|
|
1394
|
+
var ptr2 = ret[0];
|
|
1395
|
+
var len2 = ret[1];
|
|
1396
|
+
if (ret[3]) {
|
|
1397
|
+
ptr2 = 0; len2 = 0;
|
|
1398
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1399
|
+
}
|
|
1400
|
+
deferred3_0 = ptr2;
|
|
1401
|
+
deferred3_1 = len2;
|
|
1402
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1403
|
+
} finally {
|
|
1404
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Export raw markdown content to PDF format with optional branding.
|
|
1410
|
+
*
|
|
1411
|
+
* # Arguments
|
|
1412
|
+
*
|
|
1413
|
+
* * `title` - Document title
|
|
1414
|
+
* * `content` - Markdown content
|
|
1415
|
+
* * `filename` - Output filename suggestion
|
|
1416
|
+
* * `branding_json` - Optional JSON string containing BrandingConfig
|
|
1417
|
+
*
|
|
1418
|
+
* # Returns
|
|
1419
|
+
*
|
|
1420
|
+
* JSON string containing PdfExportResult (with base64-encoded PDF), or JsValue error
|
|
1421
|
+
* @param {string} title
|
|
1422
|
+
* @param {string} content
|
|
1423
|
+
* @param {string} filename
|
|
1424
|
+
* @param {string | null} [branding_json]
|
|
1425
|
+
* @returns {string}
|
|
1426
|
+
*/
|
|
1427
|
+
export function export_markdown_to_pdf(title, content, filename, branding_json) {
|
|
1428
|
+
let deferred6_0;
|
|
1429
|
+
let deferred6_1;
|
|
1430
|
+
try {
|
|
1431
|
+
const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1432
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1433
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1434
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1435
|
+
const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1436
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1437
|
+
var ptr3 = isLikeNone(branding_json) ? 0 : passStringToWasm0(branding_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1438
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1439
|
+
const ret = wasm.export_markdown_to_pdf(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1440
|
+
var ptr5 = ret[0];
|
|
1441
|
+
var len5 = ret[1];
|
|
1442
|
+
if (ret[3]) {
|
|
1443
|
+
ptr5 = 0; len5 = 0;
|
|
1444
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1445
|
+
}
|
|
1446
|
+
deferred6_0 = ptr5;
|
|
1447
|
+
deferred6_1 = len5;
|
|
1448
|
+
return getStringFromWasm0(ptr5, len5);
|
|
1449
|
+
} finally {
|
|
1450
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* Export an OpenAPI specification to YAML or JSON content.
|
|
1456
|
+
*
|
|
1457
|
+
* # Arguments
|
|
1458
|
+
*
|
|
1459
|
+
* * `content` - OpenAPI content as a string
|
|
1460
|
+
* * `source_format` - Source format ("yaml" or "json")
|
|
1461
|
+
* * `target_format` - Optional target format for conversion (None to keep original)
|
|
1462
|
+
*
|
|
1463
|
+
* # Returns
|
|
1464
|
+
*
|
|
1465
|
+
* OpenAPI content in requested format, or JsValue error
|
|
1466
|
+
* @param {string} content
|
|
1467
|
+
* @param {string} source_format
|
|
1468
|
+
* @param {string | null} [target_format]
|
|
1469
|
+
* @returns {string}
|
|
1470
|
+
*/
|
|
1471
|
+
export function export_openapi_spec(content, source_format, target_format) {
|
|
1472
|
+
let deferred5_0;
|
|
1473
|
+
let deferred5_1;
|
|
1474
|
+
try {
|
|
1475
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1476
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1477
|
+
const ptr1 = passStringToWasm0(source_format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1478
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1479
|
+
var ptr2 = isLikeNone(target_format) ? 0 : passStringToWasm0(target_format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1480
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1481
|
+
const ret = wasm.export_openapi_spec(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1482
|
+
var ptr4 = ret[0];
|
|
1483
|
+
var len4 = ret[1];
|
|
1484
|
+
if (ret[3]) {
|
|
1485
|
+
ptr4 = 0; len4 = 0;
|
|
1486
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1487
|
+
}
|
|
1488
|
+
deferred5_0 = ptr4;
|
|
1489
|
+
deferred5_1 = len4;
|
|
1490
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1491
|
+
} finally {
|
|
1492
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
* Export a data model to AVRO schema.
|
|
1498
|
+
*
|
|
1499
|
+
* # Arguments
|
|
1500
|
+
*
|
|
1501
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1502
|
+
*
|
|
1503
|
+
* # Returns
|
|
1504
|
+
*
|
|
1505
|
+
* AVRO schema JSON string, or JsValue error
|
|
1506
|
+
* @param {string} workspace_json
|
|
1507
|
+
* @returns {string}
|
|
1508
|
+
*/
|
|
1509
|
+
export function export_to_avro(workspace_json) {
|
|
1510
|
+
let deferred3_0;
|
|
1511
|
+
let deferred3_1;
|
|
1512
|
+
try {
|
|
1513
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1514
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1515
|
+
const ret = wasm.export_to_avro(ptr0, len0);
|
|
1516
|
+
var ptr2 = ret[0];
|
|
1517
|
+
var len2 = ret[1];
|
|
1518
|
+
if (ret[3]) {
|
|
1519
|
+
ptr2 = 0; len2 = 0;
|
|
1520
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1521
|
+
}
|
|
1522
|
+
deferred3_0 = ptr2;
|
|
1523
|
+
deferred3_1 = len2;
|
|
1524
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1525
|
+
} finally {
|
|
1526
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
/**
|
|
1531
|
+
* Export a CADS asset to YAML format.
|
|
1532
|
+
*
|
|
1533
|
+
* # Arguments
|
|
1534
|
+
*
|
|
1535
|
+
* * `asset_json` - JSON string containing CADS asset
|
|
1536
|
+
*
|
|
1537
|
+
* # Returns
|
|
1538
|
+
*
|
|
1539
|
+
* CADS YAML format string, or JsValue error
|
|
1540
|
+
* @param {string} asset_json
|
|
1541
|
+
* @returns {string}
|
|
1542
|
+
*/
|
|
1543
|
+
export function export_to_cads(asset_json) {
|
|
1544
|
+
let deferred3_0;
|
|
1545
|
+
let deferred3_1;
|
|
1546
|
+
try {
|
|
1547
|
+
const ptr0 = passStringToWasm0(asset_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1548
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1549
|
+
const ret = wasm.export_to_cads(ptr0, len0);
|
|
1550
|
+
var ptr2 = ret[0];
|
|
1551
|
+
var len2 = ret[1];
|
|
1552
|
+
if (ret[3]) {
|
|
1553
|
+
ptr2 = 0; len2 = 0;
|
|
1554
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1555
|
+
}
|
|
1556
|
+
deferred3_0 = ptr2;
|
|
1557
|
+
deferred3_1 = len2;
|
|
1558
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1559
|
+
} finally {
|
|
1560
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* Export a Domain to YAML format.
|
|
1566
|
+
*
|
|
1567
|
+
* # Arguments
|
|
1568
|
+
*
|
|
1569
|
+
* * `domain_json` - JSON string containing Domain
|
|
1570
|
+
*
|
|
1571
|
+
* # Returns
|
|
1572
|
+
*
|
|
1573
|
+
* Domain YAML format string, or JsValue error
|
|
1574
|
+
* @param {string} domain_json
|
|
1575
|
+
* @returns {string}
|
|
1576
|
+
*/
|
|
1577
|
+
export function export_to_domain(domain_json) {
|
|
1578
|
+
let deferred3_0;
|
|
1579
|
+
let deferred3_1;
|
|
1580
|
+
try {
|
|
1581
|
+
const ptr0 = passStringToWasm0(domain_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1582
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1583
|
+
const ret = wasm.export_to_domain(ptr0, len0);
|
|
1584
|
+
var ptr2 = ret[0];
|
|
1585
|
+
var len2 = ret[1];
|
|
1586
|
+
if (ret[3]) {
|
|
1587
|
+
ptr2 = 0; len2 = 0;
|
|
1588
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1589
|
+
}
|
|
1590
|
+
deferred3_0 = ptr2;
|
|
1591
|
+
deferred3_1 = len2;
|
|
1592
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1593
|
+
} finally {
|
|
1594
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* Export a data model to JSON Schema definition.
|
|
1600
|
+
*
|
|
1601
|
+
* # Arguments
|
|
1602
|
+
*
|
|
1603
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1604
|
+
*
|
|
1605
|
+
* # Returns
|
|
1606
|
+
*
|
|
1607
|
+
* JSON Schema definition string, or JsValue error
|
|
1608
|
+
* @param {string} workspace_json
|
|
1609
|
+
* @returns {string}
|
|
1610
|
+
*/
|
|
1611
|
+
export function export_to_json_schema(workspace_json) {
|
|
1612
|
+
let deferred3_0;
|
|
1613
|
+
let deferred3_1;
|
|
1614
|
+
try {
|
|
1615
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1616
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1617
|
+
const ret = wasm.export_to_json_schema(ptr0, len0);
|
|
1618
|
+
var ptr2 = ret[0];
|
|
1619
|
+
var len2 = ret[1];
|
|
1620
|
+
if (ret[3]) {
|
|
1621
|
+
ptr2 = 0; len2 = 0;
|
|
1622
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1623
|
+
}
|
|
1624
|
+
deferred3_0 = ptr2;
|
|
1625
|
+
deferred3_1 = len2;
|
|
1626
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1627
|
+
} finally {
|
|
1628
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* Export a workspace structure to ODCS YAML format.
|
|
1634
|
+
*
|
|
1635
|
+
* # Arguments
|
|
1636
|
+
*
|
|
1637
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1638
|
+
*
|
|
1639
|
+
* # Returns
|
|
1640
|
+
*
|
|
1641
|
+
* ODCS YAML format string, or JsValue error
|
|
1642
|
+
* @param {string} workspace_json
|
|
1643
|
+
* @returns {string}
|
|
1644
|
+
*/
|
|
1645
|
+
export function export_to_odcs_yaml(workspace_json) {
|
|
1646
|
+
let deferred3_0;
|
|
1647
|
+
let deferred3_1;
|
|
1648
|
+
try {
|
|
1649
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1650
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1651
|
+
const ret = wasm.export_to_odcs_yaml(ptr0, len0);
|
|
1652
|
+
var ptr2 = ret[0];
|
|
1653
|
+
var len2 = ret[1];
|
|
1654
|
+
if (ret[3]) {
|
|
1655
|
+
ptr2 = 0; len2 = 0;
|
|
1656
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1657
|
+
}
|
|
1658
|
+
deferred3_0 = ptr2;
|
|
1659
|
+
deferred3_1 = len2;
|
|
1660
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1661
|
+
} finally {
|
|
1662
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Export an ODPS data product to YAML format.
|
|
1668
|
+
*
|
|
1669
|
+
* # Arguments
|
|
1670
|
+
*
|
|
1671
|
+
* * `product_json` - JSON string containing ODPS data product
|
|
1672
|
+
*
|
|
1673
|
+
* # Returns
|
|
1674
|
+
*
|
|
1675
|
+
* ODPS YAML format string, or JsValue error
|
|
1676
|
+
* @param {string} product_json
|
|
1677
|
+
* @returns {string}
|
|
1678
|
+
*/
|
|
1679
|
+
export function export_to_odps(product_json) {
|
|
1680
|
+
let deferred3_0;
|
|
1681
|
+
let deferred3_1;
|
|
1682
|
+
try {
|
|
1683
|
+
const ptr0 = passStringToWasm0(product_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1684
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1685
|
+
const ret = wasm.export_to_odps(ptr0, len0);
|
|
1686
|
+
var ptr2 = ret[0];
|
|
1687
|
+
var len2 = ret[1];
|
|
1688
|
+
if (ret[3]) {
|
|
1689
|
+
ptr2 = 0; len2 = 0;
|
|
1690
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1691
|
+
}
|
|
1692
|
+
deferred3_0 = ptr2;
|
|
1693
|
+
deferred3_1 = len2;
|
|
1694
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1695
|
+
} finally {
|
|
1696
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Export a data model to Protobuf schema.
|
|
1702
|
+
*
|
|
1703
|
+
* # Arguments
|
|
1704
|
+
*
|
|
1705
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1706
|
+
*
|
|
1707
|
+
* # Returns
|
|
1708
|
+
*
|
|
1709
|
+
* Protobuf schema text, or JsValue error
|
|
1710
|
+
* @param {string} workspace_json
|
|
1711
|
+
* @returns {string}
|
|
1712
|
+
*/
|
|
1713
|
+
export function export_to_protobuf(workspace_json) {
|
|
1714
|
+
let deferred3_0;
|
|
1715
|
+
let deferred3_1;
|
|
1716
|
+
try {
|
|
1717
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1718
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1719
|
+
const ret = wasm.export_to_protobuf(ptr0, len0);
|
|
1720
|
+
var ptr2 = ret[0];
|
|
1721
|
+
var len2 = ret[1];
|
|
1722
|
+
if (ret[3]) {
|
|
1723
|
+
ptr2 = 0; len2 = 0;
|
|
1724
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1725
|
+
}
|
|
1726
|
+
deferred3_0 = ptr2;
|
|
1727
|
+
deferred3_1 = len2;
|
|
1728
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1729
|
+
} finally {
|
|
1730
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* Export a data model to SQL CREATE TABLE statements.
|
|
1736
|
+
*
|
|
1737
|
+
* # Arguments
|
|
1738
|
+
*
|
|
1739
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1740
|
+
* * `dialect` - SQL dialect ("postgresql", "mysql", "sqlserver", "databricks")
|
|
1741
|
+
*
|
|
1742
|
+
* # Returns
|
|
1743
|
+
*
|
|
1744
|
+
* SQL CREATE TABLE statements, or JsValue error
|
|
1745
|
+
* @param {string} workspace_json
|
|
1746
|
+
* @param {string} dialect
|
|
1747
|
+
* @returns {string}
|
|
1748
|
+
*/
|
|
1749
|
+
export function export_to_sql(workspace_json, dialect) {
|
|
1750
|
+
let deferred4_0;
|
|
1751
|
+
let deferred4_1;
|
|
1752
|
+
try {
|
|
1753
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1754
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1755
|
+
const ptr1 = passStringToWasm0(dialect, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1756
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1757
|
+
const ret = wasm.export_to_sql(ptr0, len0, ptr1, len1);
|
|
1758
|
+
var ptr3 = ret[0];
|
|
1759
|
+
var len3 = ret[1];
|
|
1760
|
+
if (ret[3]) {
|
|
1761
|
+
ptr3 = 0; len3 = 0;
|
|
1762
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1763
|
+
}
|
|
1764
|
+
deferred4_0 = ptr3;
|
|
1765
|
+
deferred4_1 = len3;
|
|
1766
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1767
|
+
} finally {
|
|
1768
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Export a workspace to YAML format.
|
|
1774
|
+
*
|
|
1775
|
+
* # Arguments
|
|
1776
|
+
*
|
|
1777
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
1778
|
+
*
|
|
1779
|
+
* # Returns
|
|
1780
|
+
*
|
|
1781
|
+
* Workspace YAML format string, or JsValue error
|
|
1782
|
+
* @param {string} workspace_json
|
|
1783
|
+
* @returns {string}
|
|
1784
|
+
*/
|
|
1785
|
+
export function export_workspace_to_yaml(workspace_json) {
|
|
1786
|
+
let deferred3_0;
|
|
1787
|
+
let deferred3_1;
|
|
1788
|
+
try {
|
|
1789
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1790
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1791
|
+
const ret = wasm.export_workspace_to_yaml(ptr0, len0);
|
|
1792
|
+
var ptr2 = ret[0];
|
|
1793
|
+
var len2 = ret[1];
|
|
1794
|
+
if (ret[3]) {
|
|
1795
|
+
ptr2 = 0; len2 = 0;
|
|
1796
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1797
|
+
}
|
|
1798
|
+
deferred3_0 = ptr2;
|
|
1799
|
+
deferred3_1 = len2;
|
|
1800
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1801
|
+
} finally {
|
|
1802
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/**
|
|
1807
|
+
* Filter Data Flow nodes and relationships by tag.
|
|
1808
|
+
*
|
|
1809
|
+
* # Arguments
|
|
1810
|
+
*
|
|
1811
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1812
|
+
* * `tag` - Tag to filter by
|
|
1813
|
+
*
|
|
1814
|
+
* # Returns
|
|
1815
|
+
*
|
|
1816
|
+
* JSON string containing object with `nodes` and `relationships` arrays, or JsValue error
|
|
1817
|
+
* @param {string} workspace_json
|
|
1818
|
+
* @param {string} tag
|
|
1819
|
+
* @returns {string}
|
|
1820
|
+
*/
|
|
1821
|
+
export function filter_by_tags(workspace_json, tag) {
|
|
1822
|
+
let deferred4_0;
|
|
1823
|
+
let deferred4_1;
|
|
1824
|
+
try {
|
|
1825
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1826
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1827
|
+
const ptr1 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1828
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1829
|
+
const ret = wasm.filter_by_tags(ptr0, len0, ptr1, len1);
|
|
1830
|
+
var ptr3 = ret[0];
|
|
1831
|
+
var len3 = ret[1];
|
|
1832
|
+
if (ret[3]) {
|
|
1833
|
+
ptr3 = 0; len3 = 0;
|
|
1834
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1835
|
+
}
|
|
1836
|
+
deferred4_0 = ptr3;
|
|
1837
|
+
deferred4_1 = len3;
|
|
1838
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1839
|
+
} finally {
|
|
1840
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* Filter Data Flow nodes (tables) by infrastructure type.
|
|
1846
|
+
*
|
|
1847
|
+
* # Arguments
|
|
1848
|
+
*
|
|
1849
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1850
|
+
* * `infrastructure_type` - Infrastructure type string (e.g., "Kafka", "PostgreSQL")
|
|
1851
|
+
*
|
|
1852
|
+
* # Returns
|
|
1853
|
+
*
|
|
1854
|
+
* JSON string containing array of matching tables, or JsValue error
|
|
1855
|
+
* @param {string} workspace_json
|
|
1856
|
+
* @param {string} infrastructure_type
|
|
1857
|
+
* @returns {string}
|
|
1858
|
+
*/
|
|
1859
|
+
export function filter_nodes_by_infrastructure_type(workspace_json, infrastructure_type) {
|
|
1860
|
+
let deferred4_0;
|
|
1861
|
+
let deferred4_1;
|
|
1862
|
+
try {
|
|
1863
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1864
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1865
|
+
const ptr1 = passStringToWasm0(infrastructure_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1866
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1867
|
+
const ret = wasm.filter_nodes_by_infrastructure_type(ptr0, len0, ptr1, len1);
|
|
1868
|
+
var ptr3 = ret[0];
|
|
1869
|
+
var len3 = ret[1];
|
|
1870
|
+
if (ret[3]) {
|
|
1871
|
+
ptr3 = 0; len3 = 0;
|
|
1872
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1873
|
+
}
|
|
1874
|
+
deferred4_0 = ptr3;
|
|
1875
|
+
deferred4_1 = len3;
|
|
1876
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1877
|
+
} finally {
|
|
1878
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
/**
|
|
1883
|
+
* Filter Data Flow nodes (tables) by owner.
|
|
1884
|
+
*
|
|
1885
|
+
* # Arguments
|
|
1886
|
+
*
|
|
1887
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1888
|
+
* * `owner` - Owner name to filter by (case-sensitive exact match)
|
|
1889
|
+
*
|
|
1890
|
+
* # Returns
|
|
1891
|
+
*
|
|
1892
|
+
* JSON string containing array of matching tables, or JsValue error
|
|
1893
|
+
* @param {string} workspace_json
|
|
1894
|
+
* @param {string} owner
|
|
1895
|
+
* @returns {string}
|
|
1896
|
+
*/
|
|
1897
|
+
export function filter_nodes_by_owner(workspace_json, owner) {
|
|
1898
|
+
let deferred4_0;
|
|
1899
|
+
let deferred4_1;
|
|
1900
|
+
try {
|
|
1901
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1902
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1903
|
+
const ptr1 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1904
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1905
|
+
const ret = wasm.filter_nodes_by_owner(ptr0, len0, ptr1, len1);
|
|
1906
|
+
var ptr3 = ret[0];
|
|
1907
|
+
var len3 = ret[1];
|
|
1908
|
+
if (ret[3]) {
|
|
1909
|
+
ptr3 = 0; len3 = 0;
|
|
1910
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1911
|
+
}
|
|
1912
|
+
deferred4_0 = ptr3;
|
|
1913
|
+
deferred4_1 = len3;
|
|
1914
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1915
|
+
} finally {
|
|
1916
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* Filter Data Flow relationships by infrastructure type.
|
|
1922
|
+
*
|
|
1923
|
+
* # Arguments
|
|
1924
|
+
*
|
|
1925
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1926
|
+
* * `infrastructure_type` - Infrastructure type string (e.g., "Kafka", "PostgreSQL")
|
|
1927
|
+
*
|
|
1928
|
+
* # Returns
|
|
1929
|
+
*
|
|
1930
|
+
* JSON string containing array of matching relationships, or JsValue error
|
|
1931
|
+
* @param {string} workspace_json
|
|
1932
|
+
* @param {string} infrastructure_type
|
|
1933
|
+
* @returns {string}
|
|
1934
|
+
*/
|
|
1935
|
+
export function filter_relationships_by_infrastructure_type(workspace_json, infrastructure_type) {
|
|
1936
|
+
let deferred4_0;
|
|
1937
|
+
let deferred4_1;
|
|
1938
|
+
try {
|
|
1939
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1940
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1941
|
+
const ptr1 = passStringToWasm0(infrastructure_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1942
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1943
|
+
const ret = wasm.filter_relationships_by_infrastructure_type(ptr0, len0, ptr1, len1);
|
|
1944
|
+
var ptr3 = ret[0];
|
|
1945
|
+
var len3 = ret[1];
|
|
1946
|
+
if (ret[3]) {
|
|
1947
|
+
ptr3 = 0; len3 = 0;
|
|
1948
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1949
|
+
}
|
|
1950
|
+
deferred4_0 = ptr3;
|
|
1951
|
+
deferred4_1 = len3;
|
|
1952
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1953
|
+
} finally {
|
|
1954
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
* Filter Data Flow relationships by owner.
|
|
1960
|
+
*
|
|
1961
|
+
* # Arguments
|
|
1962
|
+
*
|
|
1963
|
+
* * `workspace_json` - JSON string containing workspace/data model structure
|
|
1964
|
+
* * `owner` - Owner name to filter by (case-sensitive exact match)
|
|
1965
|
+
*
|
|
1966
|
+
* # Returns
|
|
1967
|
+
*
|
|
1968
|
+
* JSON string containing array of matching relationships, or JsValue error
|
|
1969
|
+
* @param {string} workspace_json
|
|
1970
|
+
* @param {string} owner
|
|
1971
|
+
* @returns {string}
|
|
1972
|
+
*/
|
|
1973
|
+
export function filter_relationships_by_owner(workspace_json, owner) {
|
|
1974
|
+
let deferred4_0;
|
|
1975
|
+
let deferred4_1;
|
|
1976
|
+
try {
|
|
1977
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1978
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1979
|
+
const ptr1 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1980
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1981
|
+
const ret = wasm.filter_relationships_by_owner(ptr0, len0, ptr1, len1);
|
|
1982
|
+
var ptr3 = ret[0];
|
|
1983
|
+
var len3 = ret[1];
|
|
1984
|
+
if (ret[3]) {
|
|
1985
|
+
ptr3 = 0; len3 = 0;
|
|
1986
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1987
|
+
}
|
|
1988
|
+
deferred4_0 = ptr3;
|
|
1989
|
+
deferred4_1 = len3;
|
|
1990
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1991
|
+
} finally {
|
|
1992
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* Get default Markdown branding configuration.
|
|
1998
|
+
*
|
|
1999
|
+
* # Returns
|
|
2000
|
+
*
|
|
2001
|
+
* JSON string containing default MarkdownBrandingConfig
|
|
2002
|
+
* @returns {string}
|
|
2003
|
+
*/
|
|
2004
|
+
export function get_default_markdown_branding() {
|
|
2005
|
+
let deferred2_0;
|
|
2006
|
+
let deferred2_1;
|
|
2007
|
+
try {
|
|
2008
|
+
const ret = wasm.get_default_markdown_branding();
|
|
2009
|
+
var ptr1 = ret[0];
|
|
2010
|
+
var len1 = ret[1];
|
|
2011
|
+
if (ret[3]) {
|
|
2012
|
+
ptr1 = 0; len1 = 0;
|
|
2013
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2014
|
+
}
|
|
2015
|
+
deferred2_0 = ptr1;
|
|
2016
|
+
deferred2_1 = len1;
|
|
2017
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2018
|
+
} finally {
|
|
2019
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* Get default PDF branding configuration.
|
|
2025
|
+
*
|
|
2026
|
+
* # Returns
|
|
2027
|
+
*
|
|
2028
|
+
* JSON string containing default BrandingConfig
|
|
2029
|
+
* @returns {string}
|
|
2030
|
+
*/
|
|
2031
|
+
export function get_default_pdf_branding() {
|
|
2032
|
+
let deferred2_0;
|
|
2033
|
+
let deferred2_1;
|
|
2034
|
+
try {
|
|
2035
|
+
const ret = wasm.get_default_pdf_branding();
|
|
2036
|
+
var ptr1 = ret[0];
|
|
2037
|
+
var len1 = ret[1];
|
|
2038
|
+
if (ret[3]) {
|
|
2039
|
+
ptr1 = 0; len1 = 0;
|
|
2040
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2041
|
+
}
|
|
2042
|
+
deferred2_0 = ptr1;
|
|
2043
|
+
deferred2_1 = len1;
|
|
2044
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2045
|
+
} finally {
|
|
2046
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* Get the domain ID from a domain config JSON.
|
|
2052
|
+
*
|
|
2053
|
+
* # Arguments
|
|
2054
|
+
*
|
|
2055
|
+
* * `config_json` - JSON string containing DomainConfig
|
|
2056
|
+
*
|
|
2057
|
+
* # Returns
|
|
2058
|
+
*
|
|
2059
|
+
* Domain UUID as string, or JsValue error
|
|
2060
|
+
* @param {string} config_json
|
|
2061
|
+
* @returns {string}
|
|
2062
|
+
*/
|
|
2063
|
+
export function get_domain_config_id(config_json) {
|
|
2064
|
+
let deferred3_0;
|
|
2065
|
+
let deferred3_1;
|
|
2066
|
+
try {
|
|
2067
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2068
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2069
|
+
const ret = wasm.get_domain_config_id(ptr0, len0);
|
|
2070
|
+
var ptr2 = ret[0];
|
|
2071
|
+
var len2 = ret[1];
|
|
2072
|
+
if (ret[3]) {
|
|
2073
|
+
ptr2 = 0; len2 = 0;
|
|
2074
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2075
|
+
}
|
|
2076
|
+
deferred3_0 = ptr2;
|
|
2077
|
+
deferred3_1 = len2;
|
|
2078
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2079
|
+
} finally {
|
|
2080
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Get relationships for a source table from a workspace.
|
|
2086
|
+
*
|
|
2087
|
+
* # Arguments
|
|
2088
|
+
*
|
|
2089
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
2090
|
+
* * `source_table_id` - Source table UUID as string
|
|
2091
|
+
*
|
|
2092
|
+
* # Returns
|
|
2093
|
+
*
|
|
2094
|
+
* JSON string containing array of Relationships, or JsValue error
|
|
2095
|
+
* @param {string} workspace_json
|
|
2096
|
+
* @param {string} source_table_id
|
|
2097
|
+
* @returns {string}
|
|
2098
|
+
*/
|
|
2099
|
+
export function get_workspace_relationships_for_source(workspace_json, source_table_id) {
|
|
2100
|
+
let deferred4_0;
|
|
2101
|
+
let deferred4_1;
|
|
2102
|
+
try {
|
|
2103
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2104
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2105
|
+
const ptr1 = passStringToWasm0(source_table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2106
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2107
|
+
const ret = wasm.get_workspace_relationships_for_source(ptr0, len0, ptr1, len1);
|
|
2108
|
+
var ptr3 = ret[0];
|
|
2109
|
+
var len3 = ret[1];
|
|
2110
|
+
if (ret[3]) {
|
|
2111
|
+
ptr3 = 0; len3 = 0;
|
|
2112
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2113
|
+
}
|
|
2114
|
+
deferred4_0 = ptr3;
|
|
2115
|
+
deferred4_1 = len3;
|
|
2116
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2117
|
+
} finally {
|
|
2118
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* Get relationships for a target table from a workspace.
|
|
2124
|
+
*
|
|
2125
|
+
* # Arguments
|
|
2126
|
+
*
|
|
2127
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
2128
|
+
* * `target_table_id` - Target table UUID as string
|
|
2129
|
+
*
|
|
2130
|
+
* # Returns
|
|
2131
|
+
*
|
|
2132
|
+
* JSON string containing array of Relationships, or JsValue error
|
|
2133
|
+
* @param {string} workspace_json
|
|
2134
|
+
* @param {string} target_table_id
|
|
2135
|
+
* @returns {string}
|
|
2136
|
+
*/
|
|
2137
|
+
export function get_workspace_relationships_for_target(workspace_json, target_table_id) {
|
|
2138
|
+
let deferred4_0;
|
|
2139
|
+
let deferred4_1;
|
|
2140
|
+
try {
|
|
2141
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2142
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2143
|
+
const ptr1 = passStringToWasm0(target_table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2144
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2145
|
+
const ret = wasm.get_workspace_relationships_for_target(ptr0, len0, ptr1, len1);
|
|
2146
|
+
var ptr3 = ret[0];
|
|
2147
|
+
var len3 = ret[1];
|
|
2148
|
+
if (ret[3]) {
|
|
2149
|
+
ptr3 = 0; len3 = 0;
|
|
2150
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2151
|
+
}
|
|
2152
|
+
deferred4_0 = ptr3;
|
|
2153
|
+
deferred4_1 = len3;
|
|
2154
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2155
|
+
} finally {
|
|
2156
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Import data model from AVRO schema.
|
|
2162
|
+
*
|
|
2163
|
+
* # Arguments
|
|
2164
|
+
*
|
|
2165
|
+
* * `avro_content` - AVRO schema JSON as a string
|
|
2166
|
+
*
|
|
2167
|
+
* # Returns
|
|
2168
|
+
*
|
|
2169
|
+
* JSON string containing ImportResult object, or JsValue error
|
|
2170
|
+
* @param {string} avro_content
|
|
2171
|
+
* @returns {string}
|
|
2172
|
+
*/
|
|
2173
|
+
export function import_from_avro(avro_content) {
|
|
2174
|
+
let deferred3_0;
|
|
2175
|
+
let deferred3_1;
|
|
2176
|
+
try {
|
|
2177
|
+
const ptr0 = passStringToWasm0(avro_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2178
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2179
|
+
const ret = wasm.import_from_avro(ptr0, len0);
|
|
2180
|
+
var ptr2 = ret[0];
|
|
2181
|
+
var len2 = ret[1];
|
|
2182
|
+
if (ret[3]) {
|
|
2183
|
+
ptr2 = 0; len2 = 0;
|
|
2184
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2185
|
+
}
|
|
2186
|
+
deferred3_0 = ptr2;
|
|
2187
|
+
deferred3_1 = len2;
|
|
2188
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2189
|
+
} finally {
|
|
2190
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
/**
|
|
2195
|
+
* Import CADS YAML content and return a structured representation.
|
|
2196
|
+
*
|
|
2197
|
+
* # Arguments
|
|
2198
|
+
*
|
|
2199
|
+
* * `yaml_content` - CADS YAML content as a string
|
|
2200
|
+
*
|
|
2201
|
+
* # Returns
|
|
2202
|
+
*
|
|
2203
|
+
* JSON string containing CADS asset, or JsValue error
|
|
2204
|
+
* @param {string} yaml_content
|
|
2205
|
+
* @returns {string}
|
|
2206
|
+
*/
|
|
2207
|
+
export function import_from_cads(yaml_content) {
|
|
2208
|
+
let deferred3_0;
|
|
2209
|
+
let deferred3_1;
|
|
2210
|
+
try {
|
|
2211
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2212
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2213
|
+
const ret = wasm.import_from_cads(ptr0, len0);
|
|
2214
|
+
var ptr2 = ret[0];
|
|
2215
|
+
var len2 = ret[1];
|
|
2216
|
+
if (ret[3]) {
|
|
2217
|
+
ptr2 = 0; len2 = 0;
|
|
2218
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2219
|
+
}
|
|
2220
|
+
deferred3_0 = ptr2;
|
|
2221
|
+
deferred3_1 = len2;
|
|
2222
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2223
|
+
} finally {
|
|
2224
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
/**
|
|
2229
|
+
* Import Domain YAML content and return a structured representation.
|
|
2230
|
+
*
|
|
2231
|
+
* # Arguments
|
|
2232
|
+
*
|
|
2233
|
+
* * `yaml_content` - Domain YAML content as a string
|
|
2234
|
+
*
|
|
2235
|
+
* # Returns
|
|
2236
|
+
*
|
|
2237
|
+
* JSON string containing Domain, or JsValue error
|
|
2238
|
+
* @param {string} yaml_content
|
|
2239
|
+
* @returns {string}
|
|
2240
|
+
*/
|
|
2241
|
+
export function import_from_domain(yaml_content) {
|
|
2242
|
+
let deferred3_0;
|
|
2243
|
+
let deferred3_1;
|
|
2244
|
+
try {
|
|
2245
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2246
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2247
|
+
const ret = wasm.import_from_domain(ptr0, len0);
|
|
2248
|
+
var ptr2 = ret[0];
|
|
2249
|
+
var len2 = ret[1];
|
|
2250
|
+
if (ret[3]) {
|
|
2251
|
+
ptr2 = 0; len2 = 0;
|
|
2252
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2253
|
+
}
|
|
2254
|
+
deferred3_0 = ptr2;
|
|
2255
|
+
deferred3_1 = len2;
|
|
2256
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2257
|
+
} finally {
|
|
2258
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Import data model from JSON Schema definition.
|
|
2264
|
+
*
|
|
2265
|
+
* # Arguments
|
|
2266
|
+
*
|
|
2267
|
+
* * `json_schema_content` - JSON Schema definition as a string
|
|
2268
|
+
*
|
|
2269
|
+
* # Returns
|
|
2270
|
+
*
|
|
2271
|
+
* JSON string containing ImportResult object, or JsValue error
|
|
2272
|
+
* @param {string} json_schema_content
|
|
2273
|
+
* @returns {string}
|
|
2274
|
+
*/
|
|
2275
|
+
export function import_from_json_schema(json_schema_content) {
|
|
2276
|
+
let deferred3_0;
|
|
2277
|
+
let deferred3_1;
|
|
2278
|
+
try {
|
|
2279
|
+
const ptr0 = passStringToWasm0(json_schema_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2280
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2281
|
+
const ret = wasm.import_from_json_schema(ptr0, len0);
|
|
2282
|
+
var ptr2 = ret[0];
|
|
2283
|
+
var len2 = ret[1];
|
|
2284
|
+
if (ret[3]) {
|
|
2285
|
+
ptr2 = 0; len2 = 0;
|
|
2286
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2287
|
+
}
|
|
2288
|
+
deferred3_0 = ptr2;
|
|
2289
|
+
deferred3_1 = len2;
|
|
2290
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2291
|
+
} finally {
|
|
2292
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
/**
|
|
2297
|
+
* Import ODPS YAML content and return a structured representation.
|
|
2298
|
+
*
|
|
2299
|
+
* # Arguments
|
|
2300
|
+
*
|
|
2301
|
+
* * `yaml_content` - ODPS YAML content as a string
|
|
2302
|
+
*
|
|
2303
|
+
* # Returns
|
|
2304
|
+
*
|
|
2305
|
+
* JSON string containing ODPS data product, or JsValue error
|
|
2306
|
+
* @param {string} yaml_content
|
|
2307
|
+
* @returns {string}
|
|
2308
|
+
*/
|
|
2309
|
+
export function import_from_odps(yaml_content) {
|
|
2310
|
+
let deferred3_0;
|
|
2311
|
+
let deferred3_1;
|
|
2312
|
+
try {
|
|
2313
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2314
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2315
|
+
const ret = wasm.import_from_odps(ptr0, len0);
|
|
2316
|
+
var ptr2 = ret[0];
|
|
2317
|
+
var len2 = ret[1];
|
|
2318
|
+
if (ret[3]) {
|
|
2319
|
+
ptr2 = 0; len2 = 0;
|
|
2320
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2321
|
+
}
|
|
2322
|
+
deferred3_0 = ptr2;
|
|
2323
|
+
deferred3_1 = len2;
|
|
2324
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2325
|
+
} finally {
|
|
2326
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
/**
|
|
2331
|
+
* Import data model from Protobuf schema.
|
|
2332
|
+
*
|
|
2333
|
+
* # Arguments
|
|
2334
|
+
*
|
|
2335
|
+
* * `protobuf_content` - Protobuf schema text
|
|
2336
|
+
*
|
|
2337
|
+
* # Returns
|
|
2338
|
+
*
|
|
2339
|
+
* JSON string containing ImportResult object, or JsValue error
|
|
2340
|
+
* @param {string} protobuf_content
|
|
2341
|
+
* @returns {string}
|
|
2342
|
+
*/
|
|
2343
|
+
export function import_from_protobuf(protobuf_content) {
|
|
2344
|
+
let deferred3_0;
|
|
2345
|
+
let deferred3_1;
|
|
2346
|
+
try {
|
|
2347
|
+
const ptr0 = passStringToWasm0(protobuf_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2348
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2349
|
+
const ret = wasm.import_from_protobuf(ptr0, len0);
|
|
2350
|
+
var ptr2 = ret[0];
|
|
2351
|
+
var len2 = ret[1];
|
|
2352
|
+
if (ret[3]) {
|
|
2353
|
+
ptr2 = 0; len2 = 0;
|
|
2354
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2355
|
+
}
|
|
2356
|
+
deferred3_0 = ptr2;
|
|
2357
|
+
deferred3_1 = len2;
|
|
2358
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2359
|
+
} finally {
|
|
2360
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
/**
|
|
2365
|
+
* Import data model from SQL CREATE TABLE statements.
|
|
2366
|
+
*
|
|
2367
|
+
* # Arguments
|
|
2368
|
+
*
|
|
2369
|
+
* * `sql_content` - SQL CREATE TABLE statements
|
|
2370
|
+
* * `dialect` - SQL dialect ("postgresql", "mysql", "sqlserver", "databricks")
|
|
2371
|
+
*
|
|
2372
|
+
* # Returns
|
|
2373
|
+
*
|
|
2374
|
+
* JSON string containing ImportResult object, or JsValue error
|
|
2375
|
+
* @param {string} sql_content
|
|
2376
|
+
* @param {string} dialect
|
|
2377
|
+
* @returns {string}
|
|
2378
|
+
*/
|
|
2379
|
+
export function import_from_sql(sql_content, dialect) {
|
|
2380
|
+
let deferred4_0;
|
|
2381
|
+
let deferred4_1;
|
|
2382
|
+
try {
|
|
2383
|
+
const ptr0 = passStringToWasm0(sql_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2384
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2385
|
+
const ptr1 = passStringToWasm0(dialect, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2386
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2387
|
+
const ret = wasm.import_from_sql(ptr0, len0, ptr1, len1);
|
|
2388
|
+
var ptr3 = ret[0];
|
|
2389
|
+
var len3 = ret[1];
|
|
2390
|
+
if (ret[3]) {
|
|
2391
|
+
ptr3 = 0; len3 = 0;
|
|
2392
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2393
|
+
}
|
|
2394
|
+
deferred4_0 = ptr3;
|
|
2395
|
+
deferred4_1 = len3;
|
|
2396
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2397
|
+
} finally {
|
|
2398
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* Import an OpenAPI specification from YAML or JSON content.
|
|
2404
|
+
*
|
|
2405
|
+
* # Arguments
|
|
2406
|
+
*
|
|
2407
|
+
* * `domain_id` - Domain UUID as string
|
|
2408
|
+
* * `content` - OpenAPI YAML or JSON content as a string
|
|
2409
|
+
* * `api_name` - Optional API name (extracted from info.title if not provided)
|
|
2410
|
+
*
|
|
2411
|
+
* # Returns
|
|
2412
|
+
*
|
|
2413
|
+
* JSON string containing OpenAPIModel, or JsValue error
|
|
2414
|
+
* @param {string} domain_id
|
|
2415
|
+
* @param {string} content
|
|
2416
|
+
* @param {string | null} [api_name]
|
|
2417
|
+
* @returns {string}
|
|
2418
|
+
*/
|
|
2419
|
+
export function import_openapi_spec(domain_id, content, api_name) {
|
|
2420
|
+
let deferred5_0;
|
|
2421
|
+
let deferred5_1;
|
|
2422
|
+
try {
|
|
2423
|
+
const ptr0 = passStringToWasm0(domain_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2424
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2425
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2426
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2427
|
+
var ptr2 = isLikeNone(api_name) ? 0 : passStringToWasm0(api_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2428
|
+
var len2 = WASM_VECTOR_LEN;
|
|
2429
|
+
const ret = wasm.import_openapi_spec(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2430
|
+
var ptr4 = ret[0];
|
|
2431
|
+
var len4 = ret[1];
|
|
2432
|
+
if (ret[3]) {
|
|
2433
|
+
ptr4 = 0; len4 = 0;
|
|
2434
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2435
|
+
}
|
|
2436
|
+
deferred5_0 = ptr4;
|
|
2437
|
+
deferred5_1 = len4;
|
|
2438
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2439
|
+
} finally {
|
|
2440
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* Check if the given YAML content is in legacy ODCL format.
|
|
2446
|
+
*
|
|
2447
|
+
* Returns true if the content is in ODCL format (Data Contract Specification
|
|
2448
|
+
* or simple ODCL format), false if it's in ODCS v3.x format or invalid.
|
|
2449
|
+
*
|
|
2450
|
+
* # Arguments
|
|
2451
|
+
*
|
|
2452
|
+
* * `yaml_content` - YAML content to check
|
|
2453
|
+
*
|
|
2454
|
+
* # Returns
|
|
2455
|
+
*
|
|
2456
|
+
* Boolean indicating if the content is ODCL format
|
|
2457
|
+
* @param {string} yaml_content
|
|
2458
|
+
* @returns {boolean}
|
|
2459
|
+
*/
|
|
2460
|
+
export function is_odcl_format(yaml_content) {
|
|
2461
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2463
|
+
const ret = wasm.is_odcl_format(ptr0, len0);
|
|
2464
|
+
return ret !== 0;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
/**
|
|
2468
|
+
* Load a model from browser storage (IndexedDB/localStorage).
|
|
2469
|
+
*
|
|
2470
|
+
* # Arguments
|
|
2471
|
+
*
|
|
2472
|
+
* * `db_name` - IndexedDB database name
|
|
2473
|
+
* * `store_name` - Object store name
|
|
2474
|
+
* * `workspace_path` - Workspace path to load from
|
|
2475
|
+
*
|
|
2476
|
+
* # Returns
|
|
2477
|
+
*
|
|
2478
|
+
* Promise that resolves to JSON string containing ModelLoadResult, or rejects with error
|
|
2479
|
+
* @param {string} db_name
|
|
2480
|
+
* @param {string} store_name
|
|
2481
|
+
* @param {string} workspace_path
|
|
2482
|
+
* @returns {Promise<any>}
|
|
2483
|
+
*/
|
|
2484
|
+
export function load_model(db_name, store_name, workspace_path) {
|
|
2485
|
+
const ptr0 = passStringToWasm0(db_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2487
|
+
const ptr1 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2488
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2489
|
+
const ptr2 = passStringToWasm0(workspace_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2490
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2491
|
+
const ret = wasm.load_model(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2492
|
+
return ret;
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* Migrate DataFlow YAML to Domain schema format.
|
|
2497
|
+
*
|
|
2498
|
+
* # Arguments
|
|
2499
|
+
*
|
|
2500
|
+
* * `dataflow_yaml` - DataFlow YAML content as a string
|
|
2501
|
+
* * `domain_name` - Optional domain name (defaults to "MigratedDomain")
|
|
2502
|
+
*
|
|
2503
|
+
* # Returns
|
|
2504
|
+
*
|
|
2505
|
+
* JSON string containing Domain, or JsValue error
|
|
2506
|
+
* @param {string} dataflow_yaml
|
|
2507
|
+
* @param {string | null} [domain_name]
|
|
2508
|
+
* @returns {string}
|
|
2509
|
+
*/
|
|
2510
|
+
export function migrate_dataflow_to_domain(dataflow_yaml, domain_name) {
|
|
2511
|
+
let deferred4_0;
|
|
2512
|
+
let deferred4_1;
|
|
2513
|
+
try {
|
|
2514
|
+
const ptr0 = passStringToWasm0(dataflow_yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2515
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2516
|
+
var ptr1 = isLikeNone(domain_name) ? 0 : passStringToWasm0(domain_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2517
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2518
|
+
const ret = wasm.migrate_dataflow_to_domain(ptr0, len0, ptr1, len1);
|
|
2519
|
+
var ptr3 = ret[0];
|
|
2520
|
+
var len3 = ret[1];
|
|
2521
|
+
if (ret[3]) {
|
|
2522
|
+
ptr3 = 0; len3 = 0;
|
|
2523
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2524
|
+
}
|
|
2525
|
+
deferred4_0 = ptr3;
|
|
2526
|
+
deferred4_1 = len3;
|
|
2527
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2528
|
+
} finally {
|
|
2529
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* Parse a decisions index YAML file and return a structured representation.
|
|
2535
|
+
*
|
|
2536
|
+
* # Arguments
|
|
2537
|
+
*
|
|
2538
|
+
* * `yaml_content` - Decisions index YAML content as a string (decisions.yaml)
|
|
2539
|
+
*
|
|
2540
|
+
* # Returns
|
|
2541
|
+
*
|
|
2542
|
+
* JSON string containing DecisionIndex, or JsValue error
|
|
2543
|
+
* @param {string} yaml_content
|
|
2544
|
+
* @returns {string}
|
|
2545
|
+
*/
|
|
2546
|
+
export function parse_decision_index_yaml(yaml_content) {
|
|
2547
|
+
let deferred3_0;
|
|
2548
|
+
let deferred3_1;
|
|
2549
|
+
try {
|
|
2550
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2551
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2552
|
+
const ret = wasm.parse_decision_index_yaml(ptr0, len0);
|
|
2553
|
+
var ptr2 = ret[0];
|
|
2554
|
+
var len2 = ret[1];
|
|
2555
|
+
if (ret[3]) {
|
|
2556
|
+
ptr2 = 0; len2 = 0;
|
|
2557
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2558
|
+
}
|
|
2559
|
+
deferred3_0 = ptr2;
|
|
2560
|
+
deferred3_1 = len2;
|
|
2561
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2562
|
+
} finally {
|
|
2563
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* Parse a decision YAML file and return a structured representation.
|
|
2569
|
+
*
|
|
2570
|
+
* # Arguments
|
|
2571
|
+
*
|
|
2572
|
+
* * `yaml_content` - Decision YAML content as a string (.madr.yaml)
|
|
2573
|
+
*
|
|
2574
|
+
* # Returns
|
|
2575
|
+
*
|
|
2576
|
+
* JSON string containing Decision, or JsValue error
|
|
2577
|
+
* @param {string} yaml_content
|
|
2578
|
+
* @returns {string}
|
|
2579
|
+
*/
|
|
2580
|
+
export function parse_decision_yaml(yaml_content) {
|
|
2581
|
+
let deferred3_0;
|
|
2582
|
+
let deferred3_1;
|
|
2583
|
+
try {
|
|
2584
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2585
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2586
|
+
const ret = wasm.parse_decision_yaml(ptr0, len0);
|
|
2587
|
+
var ptr2 = ret[0];
|
|
2588
|
+
var len2 = ret[1];
|
|
2589
|
+
if (ret[3]) {
|
|
2590
|
+
ptr2 = 0; len2 = 0;
|
|
2591
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2592
|
+
}
|
|
2593
|
+
deferred3_0 = ptr2;
|
|
2594
|
+
deferred3_1 = len2;
|
|
2595
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2596
|
+
} finally {
|
|
2597
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
/**
|
|
2602
|
+
* Parse domain config YAML content and return a structured representation.
|
|
2603
|
+
*
|
|
2604
|
+
* # Arguments
|
|
2605
|
+
*
|
|
2606
|
+
* * `yaml_content` - Domain config YAML content as a string
|
|
2607
|
+
*
|
|
2608
|
+
* # Returns
|
|
2609
|
+
*
|
|
2610
|
+
* JSON string containing DomainConfig, or JsValue error
|
|
2611
|
+
* @param {string} yaml_content
|
|
2612
|
+
* @returns {string}
|
|
2613
|
+
*/
|
|
2614
|
+
export function parse_domain_config_yaml(yaml_content) {
|
|
2615
|
+
let deferred3_0;
|
|
2616
|
+
let deferred3_1;
|
|
2617
|
+
try {
|
|
2618
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2620
|
+
const ret = wasm.parse_domain_config_yaml(ptr0, len0);
|
|
2621
|
+
var ptr2 = ret[0];
|
|
2622
|
+
var len2 = ret[1];
|
|
2623
|
+
if (ret[3]) {
|
|
2624
|
+
ptr2 = 0; len2 = 0;
|
|
2625
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2626
|
+
}
|
|
2627
|
+
deferred3_0 = ptr2;
|
|
2628
|
+
deferred3_1 = len2;
|
|
2629
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2630
|
+
} finally {
|
|
2631
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
/**
|
|
2636
|
+
* Parse a knowledge index YAML file and return a structured representation.
|
|
2637
|
+
*
|
|
2638
|
+
* # Arguments
|
|
2639
|
+
*
|
|
2640
|
+
* * `yaml_content` - Knowledge index YAML content as a string (knowledge.yaml)
|
|
2641
|
+
*
|
|
2642
|
+
* # Returns
|
|
2643
|
+
*
|
|
2644
|
+
* JSON string containing KnowledgeIndex, or JsValue error
|
|
2645
|
+
* @param {string} yaml_content
|
|
2646
|
+
* @returns {string}
|
|
2647
|
+
*/
|
|
2648
|
+
export function parse_knowledge_index_yaml(yaml_content) {
|
|
2649
|
+
let deferred3_0;
|
|
2650
|
+
let deferred3_1;
|
|
2651
|
+
try {
|
|
2652
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2653
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2654
|
+
const ret = wasm.parse_knowledge_index_yaml(ptr0, len0);
|
|
2655
|
+
var ptr2 = ret[0];
|
|
2656
|
+
var len2 = ret[1];
|
|
2657
|
+
if (ret[3]) {
|
|
2658
|
+
ptr2 = 0; len2 = 0;
|
|
2659
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2660
|
+
}
|
|
2661
|
+
deferred3_0 = ptr2;
|
|
2662
|
+
deferred3_1 = len2;
|
|
2663
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2664
|
+
} finally {
|
|
2665
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
/**
|
|
2670
|
+
* Parse a knowledge article YAML file and return a structured representation.
|
|
2671
|
+
*
|
|
2672
|
+
* # Arguments
|
|
2673
|
+
*
|
|
2674
|
+
* * `yaml_content` - Knowledge article YAML content as a string (.kb.yaml)
|
|
2675
|
+
*
|
|
2676
|
+
* # Returns
|
|
2677
|
+
*
|
|
2678
|
+
* JSON string containing KnowledgeArticle, or JsValue error
|
|
2679
|
+
* @param {string} yaml_content
|
|
2680
|
+
* @returns {string}
|
|
2681
|
+
*/
|
|
2682
|
+
export function parse_knowledge_yaml(yaml_content) {
|
|
2683
|
+
let deferred3_0;
|
|
2684
|
+
let deferred3_1;
|
|
2685
|
+
try {
|
|
2686
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2687
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2688
|
+
const ret = wasm.parse_knowledge_yaml(ptr0, len0);
|
|
2689
|
+
var ptr2 = ret[0];
|
|
2690
|
+
var len2 = ret[1];
|
|
2691
|
+
if (ret[3]) {
|
|
2692
|
+
ptr2 = 0; len2 = 0;
|
|
2693
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2694
|
+
}
|
|
2695
|
+
deferred3_0 = ptr2;
|
|
2696
|
+
deferred3_1 = len2;
|
|
2697
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2698
|
+
} finally {
|
|
2699
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
/**
|
|
2704
|
+
* Import data model from legacy ODCL (Open Data Contract Language) YAML format.
|
|
2705
|
+
*
|
|
2706
|
+
* This function parses legacy ODCL formats including:
|
|
2707
|
+
* - Data Contract Specification format (dataContractSpecification, models, definitions)
|
|
2708
|
+
* - Simple ODCL format (name, columns)
|
|
2709
|
+
*
|
|
2710
|
+
* For ODCS v3.1.0/v3.0.x format, use `parse_odcs_yaml` instead.
|
|
2711
|
+
*
|
|
2712
|
+
* # Arguments
|
|
2713
|
+
*
|
|
2714
|
+
* * `yaml_content` - ODCL YAML content as a string
|
|
2715
|
+
*
|
|
2716
|
+
* # Returns
|
|
2717
|
+
*
|
|
2718
|
+
* JSON string containing ImportResult object, or JsValue error
|
|
2719
|
+
* @param {string} yaml_content
|
|
2720
|
+
* @returns {string}
|
|
2721
|
+
*/
|
|
2722
|
+
export function parse_odcl_yaml(yaml_content) {
|
|
2723
|
+
let deferred3_0;
|
|
2724
|
+
let deferred3_1;
|
|
2725
|
+
try {
|
|
2726
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2727
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2728
|
+
const ret = wasm.parse_odcl_yaml(ptr0, len0);
|
|
2729
|
+
var ptr2 = ret[0];
|
|
2730
|
+
var len2 = ret[1];
|
|
2731
|
+
if (ret[3]) {
|
|
2732
|
+
ptr2 = 0; len2 = 0;
|
|
2733
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2734
|
+
}
|
|
2735
|
+
deferred3_0 = ptr2;
|
|
2736
|
+
deferred3_1 = len2;
|
|
2737
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2738
|
+
} finally {
|
|
2739
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* Parse ODCS YAML content and return a structured workspace representation.
|
|
2745
|
+
*
|
|
2746
|
+
* # Arguments
|
|
2747
|
+
*
|
|
2748
|
+
* * `yaml_content` - ODCS YAML content as a string
|
|
2749
|
+
*
|
|
2750
|
+
* # Returns
|
|
2751
|
+
*
|
|
2752
|
+
* JSON string containing ImportResult object, or JsValue error
|
|
2753
|
+
* @param {string} yaml_content
|
|
2754
|
+
* @returns {string}
|
|
2755
|
+
*/
|
|
2756
|
+
export function parse_odcs_yaml(yaml_content) {
|
|
2757
|
+
let deferred3_0;
|
|
2758
|
+
let deferred3_1;
|
|
2759
|
+
try {
|
|
2760
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2761
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2762
|
+
const ret = wasm.parse_odcs_yaml(ptr0, len0);
|
|
2763
|
+
var ptr2 = ret[0];
|
|
2764
|
+
var len2 = ret[1];
|
|
2765
|
+
if (ret[3]) {
|
|
2766
|
+
ptr2 = 0; len2 = 0;
|
|
2767
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2768
|
+
}
|
|
2769
|
+
deferred3_0 = ptr2;
|
|
2770
|
+
deferred3_1 = len2;
|
|
2771
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2772
|
+
} finally {
|
|
2773
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
/**
|
|
2778
|
+
* Parse a tag string into a Tag enum.
|
|
2779
|
+
*
|
|
2780
|
+
* # Arguments
|
|
2781
|
+
*
|
|
2782
|
+
* * `tag_str` - Tag string (Simple, Pair, or List format)
|
|
2783
|
+
*
|
|
2784
|
+
* # Returns
|
|
2785
|
+
*
|
|
2786
|
+
* JSON string containing Tag, or JsValue error
|
|
2787
|
+
* @param {string} tag_str
|
|
2788
|
+
* @returns {string}
|
|
2789
|
+
*/
|
|
2790
|
+
export function parse_tag(tag_str) {
|
|
2791
|
+
let deferred3_0;
|
|
2792
|
+
let deferred3_1;
|
|
2793
|
+
try {
|
|
2794
|
+
const ptr0 = passStringToWasm0(tag_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2795
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2796
|
+
const ret = wasm.parse_tag(ptr0, len0);
|
|
2797
|
+
var ptr2 = ret[0];
|
|
2798
|
+
var len2 = ret[1];
|
|
2799
|
+
if (ret[3]) {
|
|
2800
|
+
ptr2 = 0; len2 = 0;
|
|
2801
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2802
|
+
}
|
|
2803
|
+
deferred3_0 = ptr2;
|
|
2804
|
+
deferred3_1 = len2;
|
|
2805
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2806
|
+
} finally {
|
|
2807
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
/**
|
|
2812
|
+
* Parse workspace YAML content and return a structured representation.
|
|
2813
|
+
*
|
|
2814
|
+
* # Arguments
|
|
2815
|
+
*
|
|
2816
|
+
* * `yaml_content` - Workspace YAML content as a string
|
|
2817
|
+
*
|
|
2818
|
+
* # Returns
|
|
2819
|
+
*
|
|
2820
|
+
* JSON string containing Workspace, or JsValue error
|
|
2821
|
+
* @param {string} yaml_content
|
|
2822
|
+
* @returns {string}
|
|
2823
|
+
*/
|
|
2824
|
+
export function parse_workspace_yaml(yaml_content) {
|
|
2825
|
+
let deferred3_0;
|
|
2826
|
+
let deferred3_1;
|
|
2827
|
+
try {
|
|
2828
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2829
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2830
|
+
const ret = wasm.parse_workspace_yaml(ptr0, len0);
|
|
2831
|
+
var ptr2 = ret[0];
|
|
2832
|
+
var len2 = ret[1];
|
|
2833
|
+
if (ret[3]) {
|
|
2834
|
+
ptr2 = 0; len2 = 0;
|
|
2835
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2836
|
+
}
|
|
2837
|
+
deferred3_0 = ptr2;
|
|
2838
|
+
deferred3_1 = len2;
|
|
2839
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2840
|
+
} finally {
|
|
2841
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
/**
|
|
2846
|
+
* Remove a domain reference from a workspace.
|
|
2847
|
+
*
|
|
2848
|
+
* # Arguments
|
|
2849
|
+
*
|
|
2850
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
2851
|
+
* * `domain_id` - Domain UUID as string to remove
|
|
2852
|
+
*
|
|
2853
|
+
* # Returns
|
|
2854
|
+
*
|
|
2855
|
+
* JSON string containing updated Workspace, or JsValue error
|
|
2856
|
+
* @param {string} workspace_json
|
|
2857
|
+
* @param {string} domain_id
|
|
2858
|
+
* @returns {string}
|
|
2859
|
+
*/
|
|
2860
|
+
export function remove_domain_from_workspace(workspace_json, domain_id) {
|
|
2861
|
+
let deferred4_0;
|
|
2862
|
+
let deferred4_1;
|
|
2863
|
+
try {
|
|
2864
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2865
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2866
|
+
const ptr1 = passStringToWasm0(domain_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2867
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2868
|
+
const ret = wasm.remove_domain_from_workspace(ptr0, len0, ptr1, len1);
|
|
2869
|
+
var ptr3 = ret[0];
|
|
2870
|
+
var len3 = ret[1];
|
|
2871
|
+
if (ret[3]) {
|
|
2872
|
+
ptr3 = 0; len3 = 0;
|
|
2873
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2874
|
+
}
|
|
2875
|
+
deferred4_0 = ptr3;
|
|
2876
|
+
deferred4_1 = len3;
|
|
2877
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2878
|
+
} finally {
|
|
2879
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
/**
|
|
2884
|
+
* Remove an entity reference from a domain config.
|
|
2885
|
+
*
|
|
2886
|
+
* # Arguments
|
|
2887
|
+
*
|
|
2888
|
+
* * `config_json` - JSON string containing DomainConfig
|
|
2889
|
+
* * `entity_type` - Entity type: "system", "table", "product", "asset", "process", "decision"
|
|
2890
|
+
* * `entity_id` - Entity UUID as string to remove
|
|
2891
|
+
*
|
|
2892
|
+
* # Returns
|
|
2893
|
+
*
|
|
2894
|
+
* JSON string containing updated DomainConfig, or JsValue error
|
|
2895
|
+
* @param {string} config_json
|
|
2896
|
+
* @param {string} entity_type
|
|
2897
|
+
* @param {string} entity_id
|
|
2898
|
+
* @returns {string}
|
|
2899
|
+
*/
|
|
2900
|
+
export function remove_entity_from_domain_config(config_json, entity_type, entity_id) {
|
|
2901
|
+
let deferred5_0;
|
|
2902
|
+
let deferred5_1;
|
|
2903
|
+
try {
|
|
2904
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2905
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2906
|
+
const ptr1 = passStringToWasm0(entity_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2907
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2908
|
+
const ptr2 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2909
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2910
|
+
const ret = wasm.remove_entity_from_domain_config(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2911
|
+
var ptr4 = ret[0];
|
|
2912
|
+
var len4 = ret[1];
|
|
2913
|
+
if (ret[3]) {
|
|
2914
|
+
ptr4 = 0; len4 = 0;
|
|
2915
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2916
|
+
}
|
|
2917
|
+
deferred5_0 = ptr4;
|
|
2918
|
+
deferred5_1 = len4;
|
|
2919
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2920
|
+
} finally {
|
|
2921
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
/**
|
|
2926
|
+
* Remove a relationship from a workspace.
|
|
2927
|
+
*
|
|
2928
|
+
* # Arguments
|
|
2929
|
+
*
|
|
2930
|
+
* * `workspace_json` - JSON string containing Workspace
|
|
2931
|
+
* * `relationship_id` - Relationship UUID as string to remove
|
|
2932
|
+
*
|
|
2933
|
+
* # Returns
|
|
2934
|
+
*
|
|
2935
|
+
* JSON string containing updated Workspace, or JsValue error
|
|
2936
|
+
* @param {string} workspace_json
|
|
2937
|
+
* @param {string} relationship_id
|
|
2938
|
+
* @returns {string}
|
|
2939
|
+
*/
|
|
2940
|
+
export function remove_relationship_from_workspace(workspace_json, relationship_id) {
|
|
2941
|
+
let deferred4_0;
|
|
2942
|
+
let deferred4_1;
|
|
2943
|
+
try {
|
|
2944
|
+
const ptr0 = passStringToWasm0(workspace_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2945
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2946
|
+
const ptr1 = passStringToWasm0(relationship_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2947
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2948
|
+
const ret = wasm.remove_relationship_from_workspace(ptr0, len0, ptr1, len1);
|
|
2949
|
+
var ptr3 = ret[0];
|
|
2950
|
+
var len3 = ret[1];
|
|
2951
|
+
if (ret[3]) {
|
|
2952
|
+
ptr3 = 0; len3 = 0;
|
|
2953
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2954
|
+
}
|
|
2955
|
+
deferred4_0 = ptr3;
|
|
2956
|
+
deferred4_1 = len3;
|
|
2957
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2958
|
+
} finally {
|
|
2959
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
/**
|
|
2964
|
+
* Sanitize a description string.
|
|
2965
|
+
*
|
|
2966
|
+
* # Arguments
|
|
2967
|
+
*
|
|
2968
|
+
* * `desc` - Description string to sanitize
|
|
2969
|
+
*
|
|
2970
|
+
* # Returns
|
|
2971
|
+
*
|
|
2972
|
+
* Sanitized description string
|
|
2973
|
+
* @param {string} desc
|
|
2974
|
+
* @returns {string}
|
|
2975
|
+
*/
|
|
2976
|
+
export function sanitize_description(desc) {
|
|
2977
|
+
let deferred2_0;
|
|
2978
|
+
let deferred2_1;
|
|
2979
|
+
try {
|
|
2980
|
+
const ptr0 = passStringToWasm0(desc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2981
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2982
|
+
const ret = wasm.sanitize_description(ptr0, len0);
|
|
2983
|
+
deferred2_0 = ret[0];
|
|
2984
|
+
deferred2_1 = ret[1];
|
|
2985
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2986
|
+
} finally {
|
|
2987
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* Sanitize a SQL identifier by quoting it.
|
|
2993
|
+
*
|
|
2994
|
+
* # Arguments
|
|
2995
|
+
*
|
|
2996
|
+
* * `name` - SQL identifier to sanitize
|
|
2997
|
+
* * `dialect` - SQL dialect ("postgresql", "mysql", "sqlserver", etc.)
|
|
2998
|
+
*
|
|
2999
|
+
* # Returns
|
|
3000
|
+
*
|
|
3001
|
+
* Sanitized SQL identifier string
|
|
3002
|
+
* @param {string} name
|
|
3003
|
+
* @param {string} dialect
|
|
3004
|
+
* @returns {string}
|
|
3005
|
+
*/
|
|
3006
|
+
export function sanitize_sql_identifier(name, dialect) {
|
|
3007
|
+
let deferred3_0;
|
|
3008
|
+
let deferred3_1;
|
|
3009
|
+
try {
|
|
3010
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3011
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3012
|
+
const ptr1 = passStringToWasm0(dialect, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3013
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3014
|
+
const ret = wasm.sanitize_sql_identifier(ptr0, len0, ptr1, len1);
|
|
3015
|
+
deferred3_0 = ret[0];
|
|
3016
|
+
deferred3_1 = ret[1];
|
|
3017
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3018
|
+
} finally {
|
|
3019
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
/**
|
|
3024
|
+
* Save a model to browser storage (IndexedDB/localStorage).
|
|
3025
|
+
*
|
|
3026
|
+
* # Arguments
|
|
3027
|
+
*
|
|
3028
|
+
* * `db_name` - IndexedDB database name
|
|
3029
|
+
* * `store_name` - Object store name
|
|
3030
|
+
* * `workspace_path` - Workspace path to save to
|
|
3031
|
+
* * `model_json` - JSON string containing DataModel to save
|
|
3032
|
+
*
|
|
3033
|
+
* # Returns
|
|
3034
|
+
*
|
|
3035
|
+
* Promise that resolves to success message, or rejects with error
|
|
3036
|
+
* @param {string} db_name
|
|
3037
|
+
* @param {string} store_name
|
|
3038
|
+
* @param {string} workspace_path
|
|
3039
|
+
* @param {string} model_json
|
|
3040
|
+
* @returns {Promise<any>}
|
|
3041
|
+
*/
|
|
3042
|
+
export function save_model(db_name, store_name, workspace_path, model_json) {
|
|
3043
|
+
const ptr0 = passStringToWasm0(db_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3044
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3045
|
+
const ptr1 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3046
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3047
|
+
const ptr2 = passStringToWasm0(workspace_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3048
|
+
const len2 = WASM_VECTOR_LEN;
|
|
3049
|
+
const ptr3 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3050
|
+
const len3 = WASM_VECTOR_LEN;
|
|
3051
|
+
const ret = wasm.save_model(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
3052
|
+
return ret;
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
/**
|
|
3056
|
+
* Search knowledge articles by title, summary, or content.
|
|
3057
|
+
*
|
|
3058
|
+
* # Arguments
|
|
3059
|
+
*
|
|
3060
|
+
* * `articles_json` - JSON string containing array of KnowledgeArticle
|
|
3061
|
+
* * `query` - Search query string (case-insensitive)
|
|
3062
|
+
*
|
|
3063
|
+
* # Returns
|
|
3064
|
+
*
|
|
3065
|
+
* JSON string containing array of matching KnowledgeArticle, or JsValue error
|
|
3066
|
+
* @param {string} articles_json
|
|
3067
|
+
* @param {string} query
|
|
3068
|
+
* @returns {string}
|
|
3069
|
+
*/
|
|
3070
|
+
export function search_knowledge_articles(articles_json, query) {
|
|
3071
|
+
let deferred4_0;
|
|
3072
|
+
let deferred4_1;
|
|
3073
|
+
try {
|
|
3074
|
+
const ptr0 = passStringToWasm0(articles_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3075
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3076
|
+
const ptr1 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3077
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3078
|
+
const ret = wasm.search_knowledge_articles(ptr0, len0, ptr1, len1);
|
|
3079
|
+
var ptr3 = ret[0];
|
|
3080
|
+
var len3 = ret[1];
|
|
3081
|
+
if (ret[3]) {
|
|
3082
|
+
ptr3 = 0; len3 = 0;
|
|
3083
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3084
|
+
}
|
|
3085
|
+
deferred4_0 = ptr3;
|
|
3086
|
+
deferred4_1 = len3;
|
|
3087
|
+
return getStringFromWasm0(ptr3, len3);
|
|
3088
|
+
} finally {
|
|
3089
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
|
|
3093
|
+
/**
|
|
3094
|
+
* Serialize a Tag enum to string format.
|
|
3095
|
+
*
|
|
3096
|
+
* # Arguments
|
|
3097
|
+
*
|
|
3098
|
+
* * `tag_json` - JSON string containing Tag
|
|
3099
|
+
*
|
|
3100
|
+
* # Returns
|
|
3101
|
+
*
|
|
3102
|
+
* Tag string (Simple, Pair, or List format), or JsValue error
|
|
3103
|
+
* @param {string} tag_json
|
|
3104
|
+
* @returns {string}
|
|
3105
|
+
*/
|
|
3106
|
+
export function serialize_tag(tag_json) {
|
|
3107
|
+
let deferred3_0;
|
|
3108
|
+
let deferred3_1;
|
|
3109
|
+
try {
|
|
3110
|
+
const ptr0 = passStringToWasm0(tag_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3111
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3112
|
+
const ret = wasm.serialize_tag(ptr0, len0);
|
|
3113
|
+
var ptr2 = ret[0];
|
|
3114
|
+
var len2 = ret[1];
|
|
3115
|
+
if (ret[3]) {
|
|
3116
|
+
ptr2 = 0; len2 = 0;
|
|
3117
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3118
|
+
}
|
|
3119
|
+
deferred3_0 = ptr2;
|
|
3120
|
+
deferred3_1 = len2;
|
|
3121
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3122
|
+
} finally {
|
|
3123
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
/**
|
|
3128
|
+
* Update domain config with new view positions.
|
|
3129
|
+
*
|
|
3130
|
+
* # Arguments
|
|
3131
|
+
*
|
|
3132
|
+
* * `config_json` - JSON string containing DomainConfig
|
|
3133
|
+
* * `positions_json` - JSON string containing view positions map
|
|
3134
|
+
*
|
|
3135
|
+
* # Returns
|
|
3136
|
+
*
|
|
3137
|
+
* JSON string containing updated DomainConfig, or JsValue error
|
|
3138
|
+
* @param {string} config_json
|
|
3139
|
+
* @param {string} positions_json
|
|
3140
|
+
* @returns {string}
|
|
3141
|
+
*/
|
|
3142
|
+
export function update_domain_view_positions(config_json, positions_json) {
|
|
3143
|
+
let deferred4_0;
|
|
3144
|
+
let deferred4_1;
|
|
3145
|
+
try {
|
|
3146
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3147
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3148
|
+
const ptr1 = passStringToWasm0(positions_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3149
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3150
|
+
const ret = wasm.update_domain_view_positions(ptr0, len0, ptr1, len1);
|
|
3151
|
+
var ptr3 = ret[0];
|
|
3152
|
+
var len3 = ret[1];
|
|
3153
|
+
if (ret[3]) {
|
|
3154
|
+
ptr3 = 0; len3 = 0;
|
|
3155
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3156
|
+
}
|
|
3157
|
+
deferred4_0 = ptr3;
|
|
3158
|
+
deferred4_1 = len3;
|
|
3159
|
+
return getStringFromWasm0(ptr3, len3);
|
|
3160
|
+
} finally {
|
|
3161
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
/**
|
|
3166
|
+
* Validate a column name.
|
|
3167
|
+
*
|
|
3168
|
+
* # Arguments
|
|
3169
|
+
*
|
|
3170
|
+
* * `name` - Column name to validate
|
|
3171
|
+
*
|
|
3172
|
+
* # Returns
|
|
3173
|
+
*
|
|
3174
|
+
* JSON string with validation result: `{"valid": true}` or `{"valid": false, "error": "error message"}`
|
|
3175
|
+
* @param {string} name
|
|
3176
|
+
* @returns {string}
|
|
3177
|
+
*/
|
|
3178
|
+
export function validate_column_name(name) {
|
|
3179
|
+
let deferred3_0;
|
|
3180
|
+
let deferred3_1;
|
|
3181
|
+
try {
|
|
3182
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3183
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3184
|
+
const ret = wasm.validate_column_name(ptr0, len0);
|
|
3185
|
+
var ptr2 = ret[0];
|
|
3186
|
+
var len2 = ret[1];
|
|
3187
|
+
if (ret[3]) {
|
|
3188
|
+
ptr2 = 0; len2 = 0;
|
|
3189
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3190
|
+
}
|
|
3191
|
+
deferred3_0 = ptr2;
|
|
3192
|
+
deferred3_1 = len2;
|
|
3193
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3194
|
+
} finally {
|
|
3195
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
/**
|
|
3200
|
+
* Validate a data type string.
|
|
3201
|
+
*
|
|
3202
|
+
* # Arguments
|
|
3203
|
+
*
|
|
3204
|
+
* * `data_type` - Data type string to validate
|
|
3205
|
+
*
|
|
3206
|
+
* # Returns
|
|
3207
|
+
*
|
|
3208
|
+
* JSON string with validation result: `{"valid": true}` or `{"valid": false, "error": "error message"}`
|
|
3209
|
+
* @param {string} data_type
|
|
3210
|
+
* @returns {string}
|
|
3211
|
+
*/
|
|
3212
|
+
export function validate_data_type(data_type) {
|
|
3213
|
+
let deferred3_0;
|
|
3214
|
+
let deferred3_1;
|
|
3215
|
+
try {
|
|
3216
|
+
const ptr0 = passStringToWasm0(data_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3217
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3218
|
+
const ret = wasm.validate_data_type(ptr0, len0);
|
|
3219
|
+
var ptr2 = ret[0];
|
|
3220
|
+
var len2 = ret[1];
|
|
3221
|
+
if (ret[3]) {
|
|
3222
|
+
ptr2 = 0; len2 = 0;
|
|
3223
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3224
|
+
}
|
|
3225
|
+
deferred3_0 = ptr2;
|
|
3226
|
+
deferred3_1 = len2;
|
|
3227
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3228
|
+
} finally {
|
|
3229
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* Validate a description string.
|
|
3235
|
+
*
|
|
3236
|
+
* # Arguments
|
|
3237
|
+
*
|
|
3238
|
+
* * `desc` - Description string to validate
|
|
3239
|
+
*
|
|
3240
|
+
* # Returns
|
|
3241
|
+
*
|
|
3242
|
+
* JSON string with validation result: `{"valid": true}` or `{"valid": false, "error": "error message"}`
|
|
3243
|
+
* @param {string} desc
|
|
3244
|
+
* @returns {string}
|
|
3245
|
+
*/
|
|
3246
|
+
export function validate_description(desc) {
|
|
3247
|
+
let deferred3_0;
|
|
3248
|
+
let deferred3_1;
|
|
3249
|
+
try {
|
|
3250
|
+
const ptr0 = passStringToWasm0(desc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3251
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3252
|
+
const ret = wasm.validate_description(ptr0, len0);
|
|
3253
|
+
var ptr2 = ret[0];
|
|
3254
|
+
var len2 = ret[1];
|
|
3255
|
+
if (ret[3]) {
|
|
3256
|
+
ptr2 = 0; len2 = 0;
|
|
3257
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3258
|
+
}
|
|
3259
|
+
deferred3_0 = ptr2;
|
|
3260
|
+
deferred3_1 = len2;
|
|
3261
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3262
|
+
} finally {
|
|
3263
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3264
|
+
}
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* Validate that source and target tables are different (no self-reference).
|
|
3269
|
+
*
|
|
3270
|
+
* # Arguments
|
|
3271
|
+
*
|
|
3272
|
+
* * `source_table_id` - Source table ID (UUID string)
|
|
3273
|
+
* * `target_table_id` - Target table ID (UUID string)
|
|
3274
|
+
*
|
|
3275
|
+
* # Returns
|
|
3276
|
+
*
|
|
3277
|
+
* JSON string with validation result: `{"valid": true}` or `{"valid": false, "self_reference": {...}}`
|
|
3278
|
+
* @param {string} source_table_id
|
|
3279
|
+
* @param {string} target_table_id
|
|
3280
|
+
* @returns {string}
|
|
3281
|
+
*/
|
|
3282
|
+
export function validate_no_self_reference(source_table_id, target_table_id) {
|
|
3283
|
+
let deferred4_0;
|
|
3284
|
+
let deferred4_1;
|
|
3285
|
+
try {
|
|
3286
|
+
const ptr0 = passStringToWasm0(source_table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3287
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3288
|
+
const ptr1 = passStringToWasm0(target_table_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3289
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3290
|
+
const ret = wasm.validate_no_self_reference(ptr0, len0, ptr1, len1);
|
|
3291
|
+
var ptr3 = ret[0];
|
|
3292
|
+
var len3 = ret[1];
|
|
3293
|
+
if (ret[3]) {
|
|
3294
|
+
ptr3 = 0; len3 = 0;
|
|
3295
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3296
|
+
}
|
|
3297
|
+
deferred4_0 = ptr3;
|
|
3298
|
+
deferred4_1 = len3;
|
|
3299
|
+
return getStringFromWasm0(ptr3, len3);
|
|
3300
|
+
} finally {
|
|
3301
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
/**
|
|
3306
|
+
* Validate ODPS YAML content against the ODPS JSON Schema.
|
|
3307
|
+
*
|
|
3308
|
+
* # Arguments
|
|
3309
|
+
*
|
|
3310
|
+
* * `yaml_content` - ODPS YAML content as a string
|
|
3311
|
+
*
|
|
3312
|
+
* # Returns
|
|
3313
|
+
*
|
|
3314
|
+
* Empty string on success, or error message string
|
|
3315
|
+
* @param {string} yaml_content
|
|
3316
|
+
*/
|
|
3317
|
+
export function validate_odps(yaml_content) {
|
|
3318
|
+
const ptr0 = passStringToWasm0(yaml_content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3319
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3320
|
+
const ret = wasm.validate_odps(ptr0, len0);
|
|
3321
|
+
if (ret[1]) {
|
|
3322
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
/**
|
|
3327
|
+
* Validate pattern exclusivity for a table (SCD pattern and Data Vault classification are mutually exclusive).
|
|
3328
|
+
*
|
|
3329
|
+
* # Arguments
|
|
3330
|
+
*
|
|
3331
|
+
* * `table_json` - JSON string containing table to validate
|
|
3332
|
+
*
|
|
3333
|
+
* # Returns
|
|
3334
|
+
*
|
|
3335
|
+
* JSON string with validation result: `{"valid": true}` or `{"valid": false, "violation": {...}}`
|
|
3336
|
+
* @param {string} table_json
|
|
3337
|
+
* @returns {string}
|
|
3338
|
+
*/
|
|
3339
|
+
export function validate_pattern_exclusivity(table_json) {
|
|
3340
|
+
let deferred3_0;
|
|
3341
|
+
let deferred3_1;
|
|
3342
|
+
try {
|
|
3343
|
+
const ptr0 = passStringToWasm0(table_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3344
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3345
|
+
const ret = wasm.validate_pattern_exclusivity(ptr0, len0);
|
|
3346
|
+
var ptr2 = ret[0];
|
|
3347
|
+
var len2 = ret[1];
|
|
3348
|
+
if (ret[3]) {
|
|
3349
|
+
ptr2 = 0; len2 = 0;
|
|
3350
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3351
|
+
}
|
|
3352
|
+
deferred3_0 = ptr2;
|
|
3353
|
+
deferred3_1 = len2;
|
|
3354
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3355
|
+
} finally {
|
|
3356
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
/**
|
|
3361
|
+
* Validate a table name.
|
|
3362
|
+
*
|
|
3363
|
+
* # Arguments
|
|
3364
|
+
*
|
|
3365
|
+
* * `name` - Table name to validate
|
|
3366
|
+
*
|
|
3367
|
+
* # Returns
|
|
3368
|
+
*
|
|
3369
|
+
* JSON string with validation result: `{"valid": true}` or `{"valid": false, "error": "error message"}`
|
|
3370
|
+
* @param {string} name
|
|
3371
|
+
* @returns {string}
|
|
3372
|
+
*/
|
|
3373
|
+
export function validate_table_name(name) {
|
|
3374
|
+
let deferred3_0;
|
|
3375
|
+
let deferred3_1;
|
|
3376
|
+
try {
|
|
3377
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3378
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3379
|
+
const ret = wasm.validate_table_name(ptr0, len0);
|
|
3380
|
+
var ptr2 = ret[0];
|
|
3381
|
+
var len2 = ret[1];
|
|
3382
|
+
if (ret[3]) {
|
|
3383
|
+
ptr2 = 0; len2 = 0;
|
|
3384
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3385
|
+
}
|
|
3386
|
+
deferred3_0 = ptr2;
|
|
3387
|
+
deferred3_1 = len2;
|
|
3388
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3389
|
+
} finally {
|
|
3390
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
/**
|
|
3395
|
+
* Validate a UUID string.
|
|
3396
|
+
*
|
|
3397
|
+
* # Arguments
|
|
3398
|
+
*
|
|
3399
|
+
* * `id` - UUID string to validate
|
|
3400
|
+
*
|
|
3401
|
+
* # Returns
|
|
3402
|
+
*
|
|
3403
|
+
* JSON string with validation result: `{"valid": true, "uuid": "..."}` or `{"valid": false, "error": "error message"}`
|
|
3404
|
+
* @param {string} id
|
|
3405
|
+
* @returns {string}
|
|
3406
|
+
*/
|
|
3407
|
+
export function validate_uuid(id) {
|
|
3408
|
+
let deferred3_0;
|
|
3409
|
+
let deferred3_1;
|
|
3410
|
+
try {
|
|
3411
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3412
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3413
|
+
const ret = wasm.validate_uuid(ptr0, len0);
|
|
3414
|
+
var ptr2 = ret[0];
|
|
3415
|
+
var len2 = ret[1];
|
|
3416
|
+
if (ret[3]) {
|
|
3417
|
+
ptr2 = 0; len2 = 0;
|
|
3418
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3419
|
+
}
|
|
3420
|
+
deferred3_0 = ptr2;
|
|
3421
|
+
deferred3_1 = len2;
|
|
3422
|
+
return getStringFromWasm0(ptr2, len2);
|
|
3423
|
+
} finally {
|
|
3424
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
3429
|
+
|
|
3430
|
+
async function __wbg_load(module, imports) {
|
|
3431
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
3432
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
3433
|
+
try {
|
|
3434
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
3435
|
+
} catch (e) {
|
|
3436
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
3437
|
+
|
|
3438
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
3439
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
3440
|
+
|
|
3441
|
+
} else {
|
|
3442
|
+
throw e;
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
const bytes = await module.arrayBuffer();
|
|
3448
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
3449
|
+
} else {
|
|
3450
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
3451
|
+
|
|
3452
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
3453
|
+
return { instance, module };
|
|
3454
|
+
} else {
|
|
3455
|
+
return instance;
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
function __wbg_get_imports() {
|
|
3461
|
+
const imports = {};
|
|
3462
|
+
imports.wbg = {};
|
|
3463
|
+
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
3464
|
+
const ret = debugString(arg1);
|
|
3465
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3466
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3467
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3468
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3469
|
+
};
|
|
3470
|
+
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
3471
|
+
const ret = typeof(arg0) === 'function';
|
|
3472
|
+
return ret;
|
|
3473
|
+
};
|
|
3474
|
+
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
3475
|
+
const ret = arg0 === undefined;
|
|
3476
|
+
return ret;
|
|
3477
|
+
};
|
|
3478
|
+
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
3479
|
+
const obj = arg1;
|
|
3480
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
3481
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3482
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3483
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3484
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3485
|
+
};
|
|
3486
|
+
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
3487
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3488
|
+
};
|
|
3489
|
+
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
3490
|
+
arg0._wbg_cb_unref();
|
|
3491
|
+
};
|
|
3492
|
+
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3493
|
+
const ret = arg0.call(arg1, arg2);
|
|
3494
|
+
return ret;
|
|
3495
|
+
}, arguments) };
|
|
3496
|
+
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
3497
|
+
const ret = arg0.call(arg1);
|
|
3498
|
+
return ret;
|
|
3499
|
+
}, arguments) };
|
|
3500
|
+
imports.wbg.__wbg_createObjectStore_dba64acfe84d4191 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3501
|
+
const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2));
|
|
3502
|
+
return ret;
|
|
3503
|
+
}, arguments) };
|
|
3504
|
+
imports.wbg.__wbg_from_29a8414a7a7cd19d = function(arg0) {
|
|
3505
|
+
const ret = Array.from(arg0);
|
|
3506
|
+
return ret;
|
|
3507
|
+
};
|
|
3508
|
+
imports.wbg.__wbg_getAll_07e3f1f333b88a79 = function() { return handleError(function (arg0) {
|
|
3509
|
+
const ret = arg0.getAll();
|
|
3510
|
+
return ret;
|
|
3511
|
+
}, arguments) };
|
|
3512
|
+
imports.wbg.__wbg_getItem_1340bfc9a10d5991 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3513
|
+
const ret = arg1.getItem(getStringFromWasm0(arg2, arg3));
|
|
3514
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3515
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3516
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3517
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3518
|
+
}, arguments) };
|
|
3519
|
+
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
3520
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
3521
|
+
}, arguments) };
|
|
3522
|
+
imports.wbg.__wbg_getRandomValues_9b655bdd369112f2 = function() { return handleError(function (arg0, arg1) {
|
|
3523
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
3524
|
+
}, arguments) };
|
|
3525
|
+
imports.wbg.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
|
|
3526
|
+
const ret = arg0.getTime();
|
|
3527
|
+
return ret;
|
|
3528
|
+
};
|
|
3529
|
+
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
3530
|
+
const ret = arg0[arg1 >>> 0];
|
|
3531
|
+
return ret;
|
|
3532
|
+
};
|
|
3533
|
+
imports.wbg.__wbg_get_7d8b665fa88606d5 = function() { return handleError(function (arg0, arg1) {
|
|
3534
|
+
const ret = arg0.get(arg1);
|
|
3535
|
+
return ret;
|
|
3536
|
+
}, arguments) };
|
|
3537
|
+
imports.wbg.__wbg_indexedDB_23c232e00a1e28ad = function() { return handleError(function (arg0) {
|
|
3538
|
+
const ret = arg0.indexedDB;
|
|
3539
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3540
|
+
}, arguments) };
|
|
3541
|
+
imports.wbg.__wbg_instanceof_IdbDatabase_f4e157055e32c479 = function(arg0) {
|
|
3542
|
+
let result;
|
|
3543
|
+
try {
|
|
3544
|
+
result = arg0 instanceof IDBDatabase;
|
|
3545
|
+
} catch (_) {
|
|
3546
|
+
result = false;
|
|
3547
|
+
}
|
|
3548
|
+
const ret = result;
|
|
3549
|
+
return ret;
|
|
3550
|
+
};
|
|
3551
|
+
imports.wbg.__wbg_instanceof_IdbOpenDbRequest_e4a587961e53201e = function(arg0) {
|
|
3552
|
+
let result;
|
|
3553
|
+
try {
|
|
3554
|
+
result = arg0 instanceof IDBOpenDBRequest;
|
|
3555
|
+
} catch (_) {
|
|
3556
|
+
result = false;
|
|
3557
|
+
}
|
|
3558
|
+
const ret = result;
|
|
3559
|
+
return ret;
|
|
3560
|
+
};
|
|
3561
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
3562
|
+
let result;
|
|
3563
|
+
try {
|
|
3564
|
+
result = arg0 instanceof Window;
|
|
3565
|
+
} catch (_) {
|
|
3566
|
+
result = false;
|
|
3567
|
+
}
|
|
3568
|
+
const ret = result;
|
|
3569
|
+
return ret;
|
|
3570
|
+
};
|
|
3571
|
+
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
3572
|
+
const ret = arg0.length;
|
|
3573
|
+
return ret;
|
|
3574
|
+
};
|
|
3575
|
+
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
3576
|
+
const ret = arg0.length;
|
|
3577
|
+
return ret;
|
|
3578
|
+
};
|
|
3579
|
+
imports.wbg.__wbg_localStorage_e7a9e9fee8fc608d = function() { return handleError(function (arg0) {
|
|
3580
|
+
const ret = arg0.localStorage;
|
|
3581
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3582
|
+
}, arguments) };
|
|
3583
|
+
imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
|
|
3584
|
+
console.log(arg0);
|
|
3585
|
+
};
|
|
3586
|
+
imports.wbg.__wbg_new_0_23cedd11d9b40c9d = function() {
|
|
3587
|
+
const ret = new Date();
|
|
3588
|
+
return ret;
|
|
3589
|
+
};
|
|
3590
|
+
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
3591
|
+
try {
|
|
3592
|
+
var state0 = {a: arg0, b: arg1};
|
|
3593
|
+
var cb0 = (arg0, arg1) => {
|
|
3594
|
+
const a = state0.a;
|
|
3595
|
+
state0.a = 0;
|
|
3596
|
+
try {
|
|
3597
|
+
return wasm_bindgen__convert__closures_____invoke__h7a1f4b234d01e50d(a, state0.b, arg0, arg1);
|
|
3598
|
+
} finally {
|
|
3599
|
+
state0.a = a;
|
|
3600
|
+
}
|
|
3601
|
+
};
|
|
3602
|
+
const ret = new Promise(cb0);
|
|
3603
|
+
return ret;
|
|
3604
|
+
} finally {
|
|
3605
|
+
state0.a = state0.b = 0;
|
|
3606
|
+
}
|
|
3607
|
+
};
|
|
3608
|
+
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
3609
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
3610
|
+
return ret;
|
|
3611
|
+
};
|
|
3612
|
+
imports.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
|
|
3613
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
3614
|
+
return ret;
|
|
3615
|
+
};
|
|
3616
|
+
imports.wbg.__wbg_objectStore_da9a077b8849dbe9 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3617
|
+
const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
|
|
3618
|
+
return ret;
|
|
3619
|
+
}, arguments) };
|
|
3620
|
+
imports.wbg.__wbg_open_0d7b85f4c0a38ffe = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3621
|
+
const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
3622
|
+
return ret;
|
|
3623
|
+
}, arguments) };
|
|
3624
|
+
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
3625
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
3626
|
+
};
|
|
3627
|
+
imports.wbg.__wbg_put_d40a68e5a8902a46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3628
|
+
const ret = arg0.put(arg1, arg2);
|
|
3629
|
+
return ret;
|
|
3630
|
+
}, arguments) };
|
|
3631
|
+
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
3632
|
+
const ret = arg0.queueMicrotask;
|
|
3633
|
+
return ret;
|
|
3634
|
+
};
|
|
3635
|
+
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
3636
|
+
queueMicrotask(arg0);
|
|
3637
|
+
};
|
|
3638
|
+
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
3639
|
+
const ret = Promise.resolve(arg0);
|
|
3640
|
+
return ret;
|
|
3641
|
+
};
|
|
3642
|
+
imports.wbg.__wbg_result_084f962aedb54250 = function() { return handleError(function (arg0) {
|
|
3643
|
+
const ret = arg0.result;
|
|
3644
|
+
return ret;
|
|
3645
|
+
}, arguments) };
|
|
3646
|
+
imports.wbg.__wbg_setItem_1167ad38996d6426 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3647
|
+
arg0.setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
3648
|
+
}, arguments) };
|
|
3649
|
+
imports.wbg.__wbg_set_169e13b608078b7b = function(arg0, arg1, arg2) {
|
|
3650
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
3651
|
+
};
|
|
3652
|
+
imports.wbg.__wbg_set_onupgradeneeded_3dc6e233a6d13fe2 = function(arg0, arg1) {
|
|
3653
|
+
arg0.onupgradeneeded = arg1;
|
|
3654
|
+
};
|
|
3655
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
3656
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
3657
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3658
|
+
};
|
|
3659
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
3660
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
3661
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3662
|
+
};
|
|
3663
|
+
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
3664
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
3665
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3666
|
+
};
|
|
3667
|
+
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
3668
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
3669
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3670
|
+
};
|
|
3671
|
+
imports.wbg.__wbg_target_0e3e05a6263c37a0 = function(arg0) {
|
|
3672
|
+
const ret = arg0.target;
|
|
3673
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3674
|
+
};
|
|
3675
|
+
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
3676
|
+
const ret = arg0.then(arg1, arg2);
|
|
3677
|
+
return ret;
|
|
3678
|
+
};
|
|
3679
|
+
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
3680
|
+
const ret = arg0.then(arg1);
|
|
3681
|
+
return ret;
|
|
3682
|
+
};
|
|
3683
|
+
imports.wbg.__wbg_transaction_790ec170b8fbc74b = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3684
|
+
const ret = arg0.transaction(getStringFromWasm0(arg1, arg2), __wbindgen_enum_IdbTransactionMode[arg3]);
|
|
3685
|
+
return ret;
|
|
3686
|
+
}, arguments) };
|
|
3687
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3688
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3689
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
3690
|
+
return ret;
|
|
3691
|
+
};
|
|
3692
|
+
imports.wbg.__wbindgen_cast_9ea78d64fad2ea9c = function(arg0, arg1) {
|
|
3693
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 635, function: Function { arguments: [Externref], shim_idx: 636, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3694
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he59d4bc392497fcb, wasm_bindgen__convert__closures_____invoke__h3aa4f50d9cb64e36);
|
|
3695
|
+
return ret;
|
|
3696
|
+
};
|
|
3697
|
+
imports.wbg.__wbindgen_cast_bd9f937b6ab4e55f = function(arg0, arg1) {
|
|
3698
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 303, function: Function { arguments: [Ref(NamedExternref("IDBVersionChangeEvent"))], shim_idx: 304, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3699
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h46ca2cc66c44b619, wasm_bindgen__convert__closures________invoke__h569a0d47881447ee);
|
|
3700
|
+
return ret;
|
|
3701
|
+
};
|
|
3702
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
3703
|
+
const table = wasm.__wbindgen_externrefs;
|
|
3704
|
+
const offset = table.grow(4);
|
|
3705
|
+
table.set(0, undefined);
|
|
3706
|
+
table.set(offset + 0, undefined);
|
|
3707
|
+
table.set(offset + 1, null);
|
|
3708
|
+
table.set(offset + 2, true);
|
|
3709
|
+
table.set(offset + 3, false);
|
|
3710
|
+
};
|
|
3711
|
+
|
|
3712
|
+
return imports;
|
|
3713
|
+
}
|
|
3714
|
+
|
|
3715
|
+
function __wbg_finalize_init(instance, module) {
|
|
3716
|
+
wasm = instance.exports;
|
|
3717
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
3718
|
+
cachedDataViewMemory0 = null;
|
|
3719
|
+
cachedUint8ArrayMemory0 = null;
|
|
3720
|
+
|
|
3721
|
+
|
|
3722
|
+
wasm.__wbindgen_start();
|
|
3723
|
+
return wasm;
|
|
3724
|
+
}
|
|
3725
|
+
|
|
3726
|
+
function initSync(module) {
|
|
3727
|
+
if (wasm !== undefined) return wasm;
|
|
3728
|
+
|
|
3729
|
+
|
|
3730
|
+
if (typeof module !== 'undefined') {
|
|
3731
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
3732
|
+
({module} = module)
|
|
3733
|
+
} else {
|
|
3734
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
const imports = __wbg_get_imports();
|
|
3739
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
3740
|
+
module = new WebAssembly.Module(module);
|
|
3741
|
+
}
|
|
3742
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
3743
|
+
return __wbg_finalize_init(instance, module);
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
async function __wbg_init(module_or_path) {
|
|
3747
|
+
if (wasm !== undefined) return wasm;
|
|
3748
|
+
|
|
3749
|
+
|
|
3750
|
+
if (typeof module_or_path !== 'undefined') {
|
|
3751
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
3752
|
+
({module_or_path} = module_or_path)
|
|
3753
|
+
} else {
|
|
3754
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
if (typeof module_or_path === 'undefined') {
|
|
3759
|
+
module_or_path = new URL('data_modelling_sdk_bg.wasm', import.meta.url);
|
|
3760
|
+
}
|
|
3761
|
+
const imports = __wbg_get_imports();
|
|
3762
|
+
|
|
3763
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
3764
|
+
module_or_path = fetch(module_or_path);
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
3768
|
+
|
|
3769
|
+
return __wbg_finalize_init(instance, module);
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
export { initSync };
|
|
3773
|
+
export default __wbg_init;
|