@layers/amba-core 4.0.4 → 4.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layers/amba-core",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "description": "amba SDK runtime — shared client core used by @layers/amba-web, @layers/amba-node, @layers/amba-react-native. Internal dependency; install one of those packages instead.",
5
5
  "type": "module",
6
6
  "main": "./pkg/amba_core.js",
@@ -28,6 +28,12 @@ export class AmbaCoreWasm {
28
28
  */
29
29
  collectionsCount(collection: string, filter_json?: string | null): Promise<any>;
30
30
  collectionsDelete(collection: string, id: string): Promise<any>;
31
+ /**
32
+ * Bulk soft-delete rows matching `filter_json` (a JSON-encoded
33
+ * [`Filter`](crate::collections::Filter) tree). Returns
34
+ * `{data: {deleted: N}}`.
35
+ */
36
+ collectionsDeleteWhere(collection: string, filter_json: string): Promise<any>;
31
37
  collectionsFind(collection: string, options_json: string): Promise<any>;
32
38
  /**
33
39
  * Vector-search. `options_json` matches `NearestOptions`
@@ -36,10 +42,34 @@ export class AmbaCoreWasm {
36
42
  collectionsFindNearest(collection: string, options_json: string): Promise<any>;
37
43
  collectionsFindOne(collection: string, id: string): Promise<any>;
38
44
  collectionsInsert(collection: string, row_json: string): Promise<any>;
45
+ /**
46
+ * Restore a previously soft-deleted row by id. Returns the restored row.
47
+ */
48
+ collectionsRestore(collection: string, id: string): Promise<any>;
49
+ /**
50
+ * Run an ordered batch of writes as ONE atomic transaction.
51
+ * `operations_json` is a JSON-encoded array of wire-shaped op objects
52
+ * (`[{collection, op, id?, row?, set?, where?, expected?, on_conflict?,
53
+ * conflict_target?}]`). Resolves to the per-op results array; rejects with
54
+ * the server's structured error (naming the failing op index) on rollback.
55
+ */
56
+ collectionsTransaction(operations_json: string): Promise<any>;
39
57
  collectionsUpdate(collection: string, id: string, set_json: string): Promise<any>;
58
+ /**
59
+ * Upsert a row. `options_json` is `{on_conflict, conflict_target}` —
60
+ * `on_conflict` is `"ignore"` or `"update"`, `conflict_target` is the
61
+ * array of unique-index columns to arbitrate on. Returns the resolved
62
+ * row.
63
+ */
64
+ collectionsUpsert(collection: string, row_json: string, options_json: string): Promise<any>;
40
65
  configFetch(): Promise<any>;
41
66
  contentCreateItem(channel: string, item_json: string): Promise<any>;
42
67
  contentGetItem(id: string): Promise<any>;
68
+ /**
69
+ * Localized variant of `contentGetItem`: `language` is an optional
70
+ * BCP-47 tag forwarded as `?language=`. See `contentGetTodayLocalized`.
71
+ */
72
+ contentGetItemLocalized(id: string, language?: string | null): Promise<any>;
43
73
  /**
44
74
  * `channel` is optional; `limit` caps results per page; `cursor` is
45
75
  * the server-issued opaque pagination token. Mirror the TS wrapper
@@ -51,6 +81,14 @@ export class AmbaCoreWasm {
51
81
  * single-channel apps can call `Amba.content.getToday()` without args.
52
82
  */
53
83
  contentGetToday(channel?: string | null): Promise<any>;
84
+ /**
85
+ * Localized variant of `contentGetToday`: `language` is an optional
86
+ * BCP-47 tag (e.g. `"es-419"`). When present it is forwarded as
87
+ * `?language=`; the server returns the translated title/body when a
88
+ * translation exists, falling back to the base item otherwise. Passing
89
+ * `undefined`/`null` is identical to `contentGetToday`.
90
+ */
91
+ contentGetTodayLocalized(channel?: string | null, language?: string | null): Promise<any>;
54
92
  contentUpdateItem(id: string, state_json: string): Promise<any>;
55
93
  currenciesGetBalance(): Promise<any>;
56
94
  currenciesGetTransactions(currency_key: string): Promise<any>;
@@ -60,6 +98,7 @@ export class AmbaCoreWasm {
60
98
  diagnosticsPing(): Promise<any>;
61
99
  entitlementsHas(name: string): Promise<any>;
62
100
  entitlementsList(): Promise<any>;
101
+ entitlementsRestore(): Promise<any>;
63
102
  feedsGetActivity(feed?: string | null, cursor?: string | null): Promise<any>;
64
103
  flagsFetch(): Promise<any>;
65
104
  /**
@@ -162,6 +201,8 @@ export class AmbaCoreWasm {
162
201
  moderationGetReportStatus(id: string): Promise<any>;
163
202
  moderationReportContent(request_json: string): Promise<any>;
164
203
  moderationReportUser(request_json: string): Promise<any>;
204
+ offeringsGet(offering_id: string): Promise<any>;
205
+ offeringsList(): Promise<any>;
165
206
  onboardingComplete(): Promise<any>;
166
207
  onboardingGetStatus(): Promise<any>;
167
208
  onboardingNextStep(payload_json: string): Promise<any>;
@@ -259,16 +300,22 @@ export interface InitOutput {
259
300
  readonly ambacorewasm_challengesGetProgress: (a: number, b: number, c: number) => number;
260
301
  readonly ambacorewasm_collectionsCount: (a: number, b: number, c: number, d: number, e: number) => number;
261
302
  readonly ambacorewasm_collectionsDelete: (a: number, b: number, c: number, d: number, e: number) => number;
303
+ readonly ambacorewasm_collectionsDeleteWhere: (a: number, b: number, c: number, d: number, e: number) => number;
262
304
  readonly ambacorewasm_collectionsFind: (a: number, b: number, c: number, d: number, e: number) => number;
263
305
  readonly ambacorewasm_collectionsFindNearest: (a: number, b: number, c: number, d: number, e: number) => number;
264
306
  readonly ambacorewasm_collectionsFindOne: (a: number, b: number, c: number, d: number, e: number) => number;
265
307
  readonly ambacorewasm_collectionsInsert: (a: number, b: number, c: number, d: number, e: number) => number;
308
+ readonly ambacorewasm_collectionsRestore: (a: number, b: number, c: number, d: number, e: number) => number;
309
+ readonly ambacorewasm_collectionsTransaction: (a: number, b: number, c: number) => number;
266
310
  readonly ambacorewasm_collectionsUpdate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
311
+ readonly ambacorewasm_collectionsUpsert: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
267
312
  readonly ambacorewasm_configFetch: (a: number) => number;
268
313
  readonly ambacorewasm_contentCreateItem: (a: number, b: number, c: number, d: number, e: number) => number;
269
314
  readonly ambacorewasm_contentGetItem: (a: number, b: number, c: number) => number;
315
+ readonly ambacorewasm_contentGetItemLocalized: (a: number, b: number, c: number, d: number, e: number) => number;
270
316
  readonly ambacorewasm_contentGetLibrary: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
271
317
  readonly ambacorewasm_contentGetToday: (a: number, b: number, c: number) => number;
318
+ readonly ambacorewasm_contentGetTodayLocalized: (a: number, b: number, c: number, d: number, e: number) => number;
272
319
  readonly ambacorewasm_contentUpdateItem: (a: number, b: number, c: number, d: number, e: number) => number;
273
320
  readonly ambacorewasm_currenciesGetBalance: (a: number) => number;
274
321
  readonly ambacorewasm_currenciesGetTransactions: (a: number, b: number, c: number) => number;
@@ -278,6 +325,7 @@ export interface InitOutput {
278
325
  readonly ambacorewasm_diagnosticsPing: (a: number) => number;
279
326
  readonly ambacorewasm_entitlementsHas: (a: number, b: number, c: number) => number;
280
327
  readonly ambacorewasm_entitlementsList: (a: number) => number;
328
+ readonly ambacorewasm_entitlementsRestore: (a: number) => number;
281
329
  readonly ambacorewasm_feedsGetActivity: (a: number, b: number, c: number, d: number, e: number) => number;
282
330
  readonly ambacorewasm_flagsFetch: (a: number) => number;
283
331
  readonly ambacorewasm_flagsGet: (a: number, b: number, c: number) => number;
@@ -324,6 +372,8 @@ export interface InitOutput {
324
372
  readonly ambacorewasm_moderationGetReportStatus: (a: number, b: number, c: number) => number;
325
373
  readonly ambacorewasm_moderationReportContent: (a: number, b: number, c: number) => number;
326
374
  readonly ambacorewasm_moderationReportUser: (a: number, b: number, c: number) => number;
375
+ readonly ambacorewasm_offeringsGet: (a: number, b: number, c: number) => number;
376
+ readonly ambacorewasm_offeringsList: (a: number) => number;
327
377
  readonly ambacorewasm_onboardingComplete: (a: number) => number;
328
378
  readonly ambacorewasm_onboardingGetStatus: (a: number) => number;
329
379
  readonly ambacorewasm_onboardingNextStep: (a: number, b: number, c: number) => number;
@@ -379,9 +429,9 @@ export interface InitOutput {
379
429
  readonly ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
380
430
  readonly ambacorewasm_xpGetBalance: (a: number) => number;
381
431
  readonly ambacorewasm_xpGetHistory: (a: number, b: number) => number;
382
- readonly __wasm_bindgen_func_elem_3036: (a: number, b: number, c: number, d: number) => void;
383
- readonly __wasm_bindgen_func_elem_3017: (a: number, b: number, c: number, d: number) => void;
384
- readonly __wasm_bindgen_func_elem_3036_135: (a: number, b: number, c: number, d: number) => void;
432
+ readonly __wasm_bindgen_func_elem_3247: (a: number, b: number, c: number, d: number) => void;
433
+ readonly __wasm_bindgen_func_elem_3228: (a: number, b: number, c: number, d: number) => void;
434
+ readonly __wasm_bindgen_func_elem_3247_144: (a: number, b: number, c: number, d: number) => void;
385
435
  readonly __wbindgen_export: (a: number, b: number) => number;
386
436
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
387
437
  readonly __wbindgen_export3: (a: number) => void;
package/pkg/amba_core.js CHANGED
@@ -167,6 +167,22 @@ export class AmbaCoreWasm {
167
167
  const ret = wasm.ambacorewasm_collectionsDelete(this.__wbg_ptr, ptr0, len0, ptr1, len1);
168
168
  return takeObject(ret);
169
169
  }
170
+ /**
171
+ * Bulk soft-delete rows matching `filter_json` (a JSON-encoded
172
+ * [`Filter`](crate::collections::Filter) tree). Returns
173
+ * `{data: {deleted: N}}`.
174
+ * @param {string} collection
175
+ * @param {string} filter_json
176
+ * @returns {Promise<any>}
177
+ */
178
+ collectionsDeleteWhere(collection, filter_json) {
179
+ const ptr0 = passStringToWasm0(collection, wasm.__wbindgen_export, wasm.__wbindgen_export2);
180
+ const len0 = WASM_VECTOR_LEN;
181
+ const ptr1 = passStringToWasm0(filter_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
182
+ const len1 = WASM_VECTOR_LEN;
183
+ const ret = wasm.ambacorewasm_collectionsDeleteWhere(this.__wbg_ptr, ptr0, len0, ptr1, len1);
184
+ return takeObject(ret);
185
+ }
170
186
  /**
171
187
  * @param {string} collection
172
188
  * @param {string} options_json
@@ -221,6 +237,35 @@ export class AmbaCoreWasm {
221
237
  const ret = wasm.ambacorewasm_collectionsInsert(this.__wbg_ptr, ptr0, len0, ptr1, len1);
222
238
  return takeObject(ret);
223
239
  }
240
+ /**
241
+ * Restore a previously soft-deleted row by id. Returns the restored row.
242
+ * @param {string} collection
243
+ * @param {string} id
244
+ * @returns {Promise<any>}
245
+ */
246
+ collectionsRestore(collection, id) {
247
+ const ptr0 = passStringToWasm0(collection, wasm.__wbindgen_export, wasm.__wbindgen_export2);
248
+ const len0 = WASM_VECTOR_LEN;
249
+ const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
250
+ const len1 = WASM_VECTOR_LEN;
251
+ const ret = wasm.ambacorewasm_collectionsRestore(this.__wbg_ptr, ptr0, len0, ptr1, len1);
252
+ return takeObject(ret);
253
+ }
254
+ /**
255
+ * Run an ordered batch of writes as ONE atomic transaction.
256
+ * `operations_json` is a JSON-encoded array of wire-shaped op objects
257
+ * (`[{collection, op, id?, row?, set?, where?, expected?, on_conflict?,
258
+ * conflict_target?}]`). Resolves to the per-op results array; rejects with
259
+ * the server's structured error (naming the failing op index) on rollback.
260
+ * @param {string} operations_json
261
+ * @returns {Promise<any>}
262
+ */
263
+ collectionsTransaction(operations_json) {
264
+ const ptr0 = passStringToWasm0(operations_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
265
+ const len0 = WASM_VECTOR_LEN;
266
+ const ret = wasm.ambacorewasm_collectionsTransaction(this.__wbg_ptr, ptr0, len0);
267
+ return takeObject(ret);
268
+ }
224
269
  /**
225
270
  * @param {string} collection
226
271
  * @param {string} id
@@ -237,6 +282,26 @@ export class AmbaCoreWasm {
237
282
  const ret = wasm.ambacorewasm_collectionsUpdate(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
238
283
  return takeObject(ret);
239
284
  }
285
+ /**
286
+ * Upsert a row. `options_json` is `{on_conflict, conflict_target}` —
287
+ * `on_conflict` is `"ignore"` or `"update"`, `conflict_target` is the
288
+ * array of unique-index columns to arbitrate on. Returns the resolved
289
+ * row.
290
+ * @param {string} collection
291
+ * @param {string} row_json
292
+ * @param {string} options_json
293
+ * @returns {Promise<any>}
294
+ */
295
+ collectionsUpsert(collection, row_json, options_json) {
296
+ const ptr0 = passStringToWasm0(collection, wasm.__wbindgen_export, wasm.__wbindgen_export2);
297
+ const len0 = WASM_VECTOR_LEN;
298
+ const ptr1 = passStringToWasm0(row_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
299
+ const len1 = WASM_VECTOR_LEN;
300
+ const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
301
+ const len2 = WASM_VECTOR_LEN;
302
+ const ret = wasm.ambacorewasm_collectionsUpsert(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
303
+ return takeObject(ret);
304
+ }
240
305
  /**
241
306
  * @returns {Promise<any>}
242
307
  */
@@ -267,6 +332,21 @@ export class AmbaCoreWasm {
267
332
  const ret = wasm.ambacorewasm_contentGetItem(this.__wbg_ptr, ptr0, len0);
268
333
  return takeObject(ret);
269
334
  }
335
+ /**
336
+ * Localized variant of `contentGetItem`: `language` is an optional
337
+ * BCP-47 tag forwarded as `?language=`. See `contentGetTodayLocalized`.
338
+ * @param {string} id
339
+ * @param {string | null} [language]
340
+ * @returns {Promise<any>}
341
+ */
342
+ contentGetItemLocalized(id, language) {
343
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
344
+ const len0 = WASM_VECTOR_LEN;
345
+ var ptr1 = isLikeNone(language) ? 0 : passStringToWasm0(language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
346
+ var len1 = WASM_VECTOR_LEN;
347
+ const ret = wasm.ambacorewasm_contentGetItemLocalized(this.__wbg_ptr, ptr0, len0, ptr1, len1);
348
+ return takeObject(ret);
349
+ }
270
350
  /**
271
351
  * `channel` is optional; `limit` caps results per page; `cursor` is
272
352
  * the server-issued opaque pagination token. Mirror the TS wrapper
@@ -296,6 +376,24 @@ export class AmbaCoreWasm {
296
376
  const ret = wasm.ambacorewasm_contentGetToday(this.__wbg_ptr, ptr0, len0);
297
377
  return takeObject(ret);
298
378
  }
379
+ /**
380
+ * Localized variant of `contentGetToday`: `language` is an optional
381
+ * BCP-47 tag (e.g. `"es-419"`). When present it is forwarded as
382
+ * `?language=`; the server returns the translated title/body when a
383
+ * translation exists, falling back to the base item otherwise. Passing
384
+ * `undefined`/`null` is identical to `contentGetToday`.
385
+ * @param {string | null} [channel]
386
+ * @param {string | null} [language]
387
+ * @returns {Promise<any>}
388
+ */
389
+ contentGetTodayLocalized(channel, language) {
390
+ var ptr0 = isLikeNone(channel) ? 0 : passStringToWasm0(channel, wasm.__wbindgen_export, wasm.__wbindgen_export2);
391
+ var len0 = WASM_VECTOR_LEN;
392
+ var ptr1 = isLikeNone(language) ? 0 : passStringToWasm0(language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
393
+ var len1 = WASM_VECTOR_LEN;
394
+ const ret = wasm.ambacorewasm_contentGetTodayLocalized(this.__wbg_ptr, ptr0, len0, ptr1, len1);
395
+ return takeObject(ret);
396
+ }
299
397
  /**
300
398
  * @param {string} id
301
399
  * @param {string} state_json
@@ -377,6 +475,13 @@ export class AmbaCoreWasm {
377
475
  const ret = wasm.ambacorewasm_entitlementsList(this.__wbg_ptr);
378
476
  return takeObject(ret);
379
477
  }
478
+ /**
479
+ * @returns {Promise<any>}
480
+ */
481
+ entitlementsRestore() {
482
+ const ret = wasm.ambacorewasm_entitlementsRestore(this.__wbg_ptr);
483
+ return takeObject(ret);
484
+ }
380
485
  /**
381
486
  * @param {string | null} [feed]
382
487
  * @param {string | null} [cursor]
@@ -890,6 +995,23 @@ export class AmbaCoreWasm {
890
995
  const ret = wasm.ambacorewasm_moderationReportUser(this.__wbg_ptr, ptr0, len0);
891
996
  return takeObject(ret);
892
997
  }
998
+ /**
999
+ * @param {string} offering_id
1000
+ * @returns {Promise<any>}
1001
+ */
1002
+ offeringsGet(offering_id) {
1003
+ const ptr0 = passStringToWasm0(offering_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1004
+ const len0 = WASM_VECTOR_LEN;
1005
+ const ret = wasm.ambacorewasm_offeringsGet(this.__wbg_ptr, ptr0, len0);
1006
+ return takeObject(ret);
1007
+ }
1008
+ /**
1009
+ * @returns {Promise<any>}
1010
+ */
1011
+ offeringsList() {
1012
+ const ret = wasm.ambacorewasm_offeringsList(this.__wbg_ptr);
1013
+ return takeObject(ret);
1014
+ }
893
1015
  /**
894
1016
  * @returns {Promise<any>}
895
1017
  */
@@ -1567,7 +1689,7 @@ function __wbg_get_imports() {
1567
1689
  const a = state0.a;
1568
1690
  state0.a = 0;
1569
1691
  try {
1570
- return __wasm_bindgen_func_elem_3036_135(a, state0.b, arg0, arg1);
1692
+ return __wasm_bindgen_func_elem_3247_144(a, state0.b, arg0, arg1);
1571
1693
  } finally {
1572
1694
  state0.a = a;
1573
1695
  }
@@ -1638,13 +1760,13 @@ function __wbg_get_imports() {
1638
1760
  return addHeapObject(ret);
1639
1761
  },
1640
1762
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1641
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 774, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1642
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3036);
1763
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 829, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1764
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3247);
1643
1765
  return addHeapObject(ret);
1644
1766
  },
1645
1767
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1646
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 763, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1647
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3017);
1768
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 818, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1769
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3228);
1648
1770
  return addHeapObject(ret);
1649
1771
  },
1650
1772
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1681,14 +1803,14 @@ function __wbg_get_imports() {
1681
1803
  };
1682
1804
  }
1683
1805
 
1684
- function __wasm_bindgen_func_elem_3036(arg0, arg1, arg2, arg3) {
1685
- wasm.__wasm_bindgen_func_elem_3036(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1806
+ function __wasm_bindgen_func_elem_3247(arg0, arg1, arg2, arg3) {
1807
+ wasm.__wasm_bindgen_func_elem_3247(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1686
1808
  }
1687
1809
 
1688
- function __wasm_bindgen_func_elem_3017(arg0, arg1, arg2) {
1810
+ function __wasm_bindgen_func_elem_3228(arg0, arg1, arg2) {
1689
1811
  try {
1690
1812
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1691
- wasm.__wasm_bindgen_func_elem_3017(retptr, arg0, arg1, addHeapObject(arg2));
1813
+ wasm.__wasm_bindgen_func_elem_3228(retptr, arg0, arg1, addHeapObject(arg2));
1692
1814
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1693
1815
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1694
1816
  if (r1) {
@@ -1699,8 +1821,8 @@ function __wasm_bindgen_func_elem_3017(arg0, arg1, arg2) {
1699
1821
  }
1700
1822
  }
1701
1823
 
1702
- function __wasm_bindgen_func_elem_3036_135(arg0, arg1, arg2, arg3) {
1703
- wasm.__wasm_bindgen_func_elem_3036_135(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1824
+ function __wasm_bindgen_func_elem_3247_144(arg0, arg1, arg2, arg3) {
1825
+ wasm.__wasm_bindgen_func_elem_3247_144(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1704
1826
  }
1705
1827
 
1706
1828
  const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
@@ -15,16 +15,22 @@ export const ambacorewasm_challengesGetActive: (a: number) => number;
15
15
  export const ambacorewasm_challengesGetProgress: (a: number, b: number, c: number) => number;
16
16
  export const ambacorewasm_collectionsCount: (a: number, b: number, c: number, d: number, e: number) => number;
17
17
  export const ambacorewasm_collectionsDelete: (a: number, b: number, c: number, d: number, e: number) => number;
18
+ export const ambacorewasm_collectionsDeleteWhere: (a: number, b: number, c: number, d: number, e: number) => number;
18
19
  export const ambacorewasm_collectionsFind: (a: number, b: number, c: number, d: number, e: number) => number;
19
20
  export const ambacorewasm_collectionsFindNearest: (a: number, b: number, c: number, d: number, e: number) => number;
20
21
  export const ambacorewasm_collectionsFindOne: (a: number, b: number, c: number, d: number, e: number) => number;
21
22
  export const ambacorewasm_collectionsInsert: (a: number, b: number, c: number, d: number, e: number) => number;
23
+ export const ambacorewasm_collectionsRestore: (a: number, b: number, c: number, d: number, e: number) => number;
24
+ export const ambacorewasm_collectionsTransaction: (a: number, b: number, c: number) => number;
22
25
  export const ambacorewasm_collectionsUpdate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
26
+ export const ambacorewasm_collectionsUpsert: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
23
27
  export const ambacorewasm_configFetch: (a: number) => number;
24
28
  export const ambacorewasm_contentCreateItem: (a: number, b: number, c: number, d: number, e: number) => number;
25
29
  export const ambacorewasm_contentGetItem: (a: number, b: number, c: number) => number;
30
+ export const ambacorewasm_contentGetItemLocalized: (a: number, b: number, c: number, d: number, e: number) => number;
26
31
  export const ambacorewasm_contentGetLibrary: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
27
32
  export const ambacorewasm_contentGetToday: (a: number, b: number, c: number) => number;
33
+ export const ambacorewasm_contentGetTodayLocalized: (a: number, b: number, c: number, d: number, e: number) => number;
28
34
  export const ambacorewasm_contentUpdateItem: (a: number, b: number, c: number, d: number, e: number) => number;
29
35
  export const ambacorewasm_currenciesGetBalance: (a: number) => number;
30
36
  export const ambacorewasm_currenciesGetTransactions: (a: number, b: number, c: number) => number;
@@ -34,6 +40,7 @@ export const ambacorewasm_deepLinksGet: (a: number, b: number, c: number) => num
34
40
  export const ambacorewasm_diagnosticsPing: (a: number) => number;
35
41
  export const ambacorewasm_entitlementsHas: (a: number, b: number, c: number) => number;
36
42
  export const ambacorewasm_entitlementsList: (a: number) => number;
43
+ export const ambacorewasm_entitlementsRestore: (a: number) => number;
37
44
  export const ambacorewasm_feedsGetActivity: (a: number, b: number, c: number, d: number, e: number) => number;
38
45
  export const ambacorewasm_flagsFetch: (a: number) => number;
39
46
  export const ambacorewasm_flagsGet: (a: number, b: number, c: number) => number;
@@ -80,6 +87,8 @@ export const ambacorewasm_messagingSendMessage: (a: number, b: number, c: number
80
87
  export const ambacorewasm_moderationGetReportStatus: (a: number, b: number, c: number) => number;
81
88
  export const ambacorewasm_moderationReportContent: (a: number, b: number, c: number) => number;
82
89
  export const ambacorewasm_moderationReportUser: (a: number, b: number, c: number) => number;
90
+ export const ambacorewasm_offeringsGet: (a: number, b: number, c: number) => number;
91
+ export const ambacorewasm_offeringsList: (a: number) => number;
83
92
  export const ambacorewasm_onboardingComplete: (a: number) => number;
84
93
  export const ambacorewasm_onboardingGetStatus: (a: number) => number;
85
94
  export const ambacorewasm_onboardingNextStep: (a: number, b: number, c: number) => number;
@@ -135,9 +144,9 @@ export const ambacorewasm_verifySmsOtp: (a: number, b: number, c: number, d: num
135
144
  export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
136
145
  export const ambacorewasm_xpGetBalance: (a: number) => number;
137
146
  export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
138
- export const __wasm_bindgen_func_elem_3036: (a: number, b: number, c: number, d: number) => void;
139
- export const __wasm_bindgen_func_elem_3017: (a: number, b: number, c: number, d: number) => void;
140
- export const __wasm_bindgen_func_elem_3036_135: (a: number, b: number, c: number, d: number) => void;
147
+ export const __wasm_bindgen_func_elem_3247: (a: number, b: number, c: number, d: number) => void;
148
+ export const __wasm_bindgen_func_elem_3228: (a: number, b: number, c: number, d: number) => void;
149
+ export const __wasm_bindgen_func_elem_3247_144: (a: number, b: number, c: number, d: number) => void;
141
150
  export const __wbindgen_export: (a: number, b: number) => number;
142
151
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
143
152
  export const __wbindgen_export3: (a: number) => void;
@@ -28,6 +28,12 @@ export class AmbaCoreWasm {
28
28
  */
29
29
  collectionsCount(collection: string, filter_json?: string | null): Promise<any>;
30
30
  collectionsDelete(collection: string, id: string): Promise<any>;
31
+ /**
32
+ * Bulk soft-delete rows matching `filter_json` (a JSON-encoded
33
+ * [`Filter`](crate::collections::Filter) tree). Returns
34
+ * `{data: {deleted: N}}`.
35
+ */
36
+ collectionsDeleteWhere(collection: string, filter_json: string): Promise<any>;
31
37
  collectionsFind(collection: string, options_json: string): Promise<any>;
32
38
  /**
33
39
  * Vector-search. `options_json` matches `NearestOptions`
@@ -36,10 +42,34 @@ export class AmbaCoreWasm {
36
42
  collectionsFindNearest(collection: string, options_json: string): Promise<any>;
37
43
  collectionsFindOne(collection: string, id: string): Promise<any>;
38
44
  collectionsInsert(collection: string, row_json: string): Promise<any>;
45
+ /**
46
+ * Restore a previously soft-deleted row by id. Returns the restored row.
47
+ */
48
+ collectionsRestore(collection: string, id: string): Promise<any>;
49
+ /**
50
+ * Run an ordered batch of writes as ONE atomic transaction.
51
+ * `operations_json` is a JSON-encoded array of wire-shaped op objects
52
+ * (`[{collection, op, id?, row?, set?, where?, expected?, on_conflict?,
53
+ * conflict_target?}]`). Resolves to the per-op results array; rejects with
54
+ * the server's structured error (naming the failing op index) on rollback.
55
+ */
56
+ collectionsTransaction(operations_json: string): Promise<any>;
39
57
  collectionsUpdate(collection: string, id: string, set_json: string): Promise<any>;
58
+ /**
59
+ * Upsert a row. `options_json` is `{on_conflict, conflict_target}` —
60
+ * `on_conflict` is `"ignore"` or `"update"`, `conflict_target` is the
61
+ * array of unique-index columns to arbitrate on. Returns the resolved
62
+ * row.
63
+ */
64
+ collectionsUpsert(collection: string, row_json: string, options_json: string): Promise<any>;
40
65
  configFetch(): Promise<any>;
41
66
  contentCreateItem(channel: string, item_json: string): Promise<any>;
42
67
  contentGetItem(id: string): Promise<any>;
68
+ /**
69
+ * Localized variant of `contentGetItem`: `language` is an optional
70
+ * BCP-47 tag forwarded as `?language=`. See `contentGetTodayLocalized`.
71
+ */
72
+ contentGetItemLocalized(id: string, language?: string | null): Promise<any>;
43
73
  /**
44
74
  * `channel` is optional; `limit` caps results per page; `cursor` is
45
75
  * the server-issued opaque pagination token. Mirror the TS wrapper
@@ -51,6 +81,14 @@ export class AmbaCoreWasm {
51
81
  * single-channel apps can call `Amba.content.getToday()` without args.
52
82
  */
53
83
  contentGetToday(channel?: string | null): Promise<any>;
84
+ /**
85
+ * Localized variant of `contentGetToday`: `language` is an optional
86
+ * BCP-47 tag (e.g. `"es-419"`). When present it is forwarded as
87
+ * `?language=`; the server returns the translated title/body when a
88
+ * translation exists, falling back to the base item otherwise. Passing
89
+ * `undefined`/`null` is identical to `contentGetToday`.
90
+ */
91
+ contentGetTodayLocalized(channel?: string | null, language?: string | null): Promise<any>;
54
92
  contentUpdateItem(id: string, state_json: string): Promise<any>;
55
93
  currenciesGetBalance(): Promise<any>;
56
94
  currenciesGetTransactions(currency_key: string): Promise<any>;
@@ -60,6 +98,7 @@ export class AmbaCoreWasm {
60
98
  diagnosticsPing(): Promise<any>;
61
99
  entitlementsHas(name: string): Promise<any>;
62
100
  entitlementsList(): Promise<any>;
101
+ entitlementsRestore(): Promise<any>;
63
102
  feedsGetActivity(feed?: string | null, cursor?: string | null): Promise<any>;
64
103
  flagsFetch(): Promise<any>;
65
104
  /**
@@ -162,6 +201,8 @@ export class AmbaCoreWasm {
162
201
  moderationGetReportStatus(id: string): Promise<any>;
163
202
  moderationReportContent(request_json: string): Promise<any>;
164
203
  moderationReportUser(request_json: string): Promise<any>;
204
+ offeringsGet(offering_id: string): Promise<any>;
205
+ offeringsList(): Promise<any>;
165
206
  onboardingComplete(): Promise<any>;
166
207
  onboardingGetStatus(): Promise<any>;
167
208
  onboardingNextStep(payload_json: string): Promise<any>;