@layers/amba-core 4.0.3 → 4.0.5
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 +1 -1
- package/pkg/amba_core.d.ts +55 -3
- package/pkg/amba_core.js +146 -11
- package/pkg/amba_core_bg.wasm +0 -0
- package/pkg/amba_core_bg.wasm.d.ts +13 -3
- package/pkg-rn/amba_core.d.ts +42 -0
- package/pkg-rn/amba_core_bg.js +146 -11
- package/pkg-rn/amba_core_bg.wasm.d.ts +13 -3
- package/pkg-rn/amba_core_bg.wasm.js +79784 -57615
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layers/amba-core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
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",
|
package/pkg/amba_core.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -115,6 +154,7 @@ export class AmbaCoreWasm {
|
|
|
115
154
|
leaguesMe(): Promise<any>;
|
|
116
155
|
linkAccount(provider: string, credential: string): Promise<any>;
|
|
117
156
|
linkEmailOtp(email: string, code: string): Promise<any>;
|
|
157
|
+
linkEmailPassword(email: string, password: string): Promise<any>;
|
|
118
158
|
linkSmsOtp(phone: string, code: string): Promise<any>;
|
|
119
159
|
me(): Promise<any>;
|
|
120
160
|
/**
|
|
@@ -161,6 +201,8 @@ export class AmbaCoreWasm {
|
|
|
161
201
|
moderationGetReportStatus(id: string): Promise<any>;
|
|
162
202
|
moderationReportContent(request_json: string): Promise<any>;
|
|
163
203
|
moderationReportUser(request_json: string): Promise<any>;
|
|
204
|
+
offeringsGet(offering_id: string): Promise<any>;
|
|
205
|
+
offeringsList(): Promise<any>;
|
|
164
206
|
onboardingComplete(): Promise<any>;
|
|
165
207
|
onboardingGetStatus(): Promise<any>;
|
|
166
208
|
onboardingNextStep(payload_json: string): Promise<any>;
|
|
@@ -258,16 +300,22 @@ export interface InitOutput {
|
|
|
258
300
|
readonly ambacorewasm_challengesGetProgress: (a: number, b: number, c: number) => number;
|
|
259
301
|
readonly ambacorewasm_collectionsCount: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
260
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;
|
|
261
304
|
readonly ambacorewasm_collectionsFind: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
262
305
|
readonly ambacorewasm_collectionsFindNearest: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
263
306
|
readonly ambacorewasm_collectionsFindOne: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
264
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;
|
|
265
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;
|
|
266
312
|
readonly ambacorewasm_configFetch: (a: number) => number;
|
|
267
313
|
readonly ambacorewasm_contentCreateItem: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
268
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;
|
|
269
316
|
readonly ambacorewasm_contentGetLibrary: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
270
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;
|
|
271
319
|
readonly ambacorewasm_contentUpdateItem: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
272
320
|
readonly ambacorewasm_currenciesGetBalance: (a: number) => number;
|
|
273
321
|
readonly ambacorewasm_currenciesGetTransactions: (a: number, b: number, c: number) => number;
|
|
@@ -277,6 +325,7 @@ export interface InitOutput {
|
|
|
277
325
|
readonly ambacorewasm_diagnosticsPing: (a: number) => number;
|
|
278
326
|
readonly ambacorewasm_entitlementsHas: (a: number, b: number, c: number) => number;
|
|
279
327
|
readonly ambacorewasm_entitlementsList: (a: number) => number;
|
|
328
|
+
readonly ambacorewasm_entitlementsRestore: (a: number) => number;
|
|
280
329
|
readonly ambacorewasm_feedsGetActivity: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
281
330
|
readonly ambacorewasm_flagsFetch: (a: number) => number;
|
|
282
331
|
readonly ambacorewasm_flagsGet: (a: number, b: number, c: number) => number;
|
|
@@ -310,6 +359,7 @@ export interface InitOutput {
|
|
|
310
359
|
readonly ambacorewasm_leaguesMe: (a: number) => number;
|
|
311
360
|
readonly ambacorewasm_linkAccount: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
312
361
|
readonly ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
362
|
+
readonly ambacorewasm_linkEmailPassword: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
313
363
|
readonly ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
314
364
|
readonly ambacorewasm_me: (a: number) => number;
|
|
315
365
|
readonly ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
@@ -322,6 +372,8 @@ export interface InitOutput {
|
|
|
322
372
|
readonly ambacorewasm_moderationGetReportStatus: (a: number, b: number, c: number) => number;
|
|
323
373
|
readonly ambacorewasm_moderationReportContent: (a: number, b: number, c: number) => number;
|
|
324
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;
|
|
325
377
|
readonly ambacorewasm_onboardingComplete: (a: number) => number;
|
|
326
378
|
readonly ambacorewasm_onboardingGetStatus: (a: number) => number;
|
|
327
379
|
readonly ambacorewasm_onboardingNextStep: (a: number, b: number, c: number) => number;
|
|
@@ -377,9 +429,9 @@ export interface InitOutput {
|
|
|
377
429
|
readonly ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
|
|
378
430
|
readonly ambacorewasm_xpGetBalance: (a: number) => number;
|
|
379
431
|
readonly ambacorewasm_xpGetHistory: (a: number, b: number) => number;
|
|
380
|
-
readonly
|
|
381
|
-
readonly
|
|
382
|
-
readonly
|
|
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;
|
|
383
435
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
384
436
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
385
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]
|
|
@@ -730,6 +835,19 @@ export class AmbaCoreWasm {
|
|
|
730
835
|
const ret = wasm.ambacorewasm_linkEmailOtp(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
731
836
|
return takeObject(ret);
|
|
732
837
|
}
|
|
838
|
+
/**
|
|
839
|
+
* @param {string} email
|
|
840
|
+
* @param {string} password
|
|
841
|
+
* @returns {Promise<any>}
|
|
842
|
+
*/
|
|
843
|
+
linkEmailPassword(email, password) {
|
|
844
|
+
const ptr0 = passStringToWasm0(email, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
845
|
+
const len0 = WASM_VECTOR_LEN;
|
|
846
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
847
|
+
const len1 = WASM_VECTOR_LEN;
|
|
848
|
+
const ret = wasm.ambacorewasm_linkEmailPassword(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
849
|
+
return takeObject(ret);
|
|
850
|
+
}
|
|
733
851
|
/**
|
|
734
852
|
* @param {string} phone
|
|
735
853
|
* @param {string} code
|
|
@@ -877,6 +995,23 @@ export class AmbaCoreWasm {
|
|
|
877
995
|
const ret = wasm.ambacorewasm_moderationReportUser(this.__wbg_ptr, ptr0, len0);
|
|
878
996
|
return takeObject(ret);
|
|
879
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
|
+
}
|
|
880
1015
|
/**
|
|
881
1016
|
* @returns {Promise<any>}
|
|
882
1017
|
*/
|
|
@@ -1554,7 +1689,7 @@ function __wbg_get_imports() {
|
|
|
1554
1689
|
const a = state0.a;
|
|
1555
1690
|
state0.a = 0;
|
|
1556
1691
|
try {
|
|
1557
|
-
return
|
|
1692
|
+
return __wasm_bindgen_func_elem_3247_144(a, state0.b, arg0, arg1);
|
|
1558
1693
|
} finally {
|
|
1559
1694
|
state0.a = a;
|
|
1560
1695
|
}
|
|
@@ -1625,13 +1760,13 @@ function __wbg_get_imports() {
|
|
|
1625
1760
|
return addHeapObject(ret);
|
|
1626
1761
|
},
|
|
1627
1762
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1628
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx:
|
|
1629
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
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);
|
|
1630
1765
|
return addHeapObject(ret);
|
|
1631
1766
|
},
|
|
1632
1767
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1633
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1634
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
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);
|
|
1635
1770
|
return addHeapObject(ret);
|
|
1636
1771
|
},
|
|
1637
1772
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -1668,14 +1803,14 @@ function __wbg_get_imports() {
|
|
|
1668
1803
|
};
|
|
1669
1804
|
}
|
|
1670
1805
|
|
|
1671
|
-
function
|
|
1672
|
-
wasm.
|
|
1806
|
+
function __wasm_bindgen_func_elem_3247(arg0, arg1, arg2, arg3) {
|
|
1807
|
+
wasm.__wasm_bindgen_func_elem_3247(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1673
1808
|
}
|
|
1674
1809
|
|
|
1675
|
-
function
|
|
1810
|
+
function __wasm_bindgen_func_elem_3228(arg0, arg1, arg2) {
|
|
1676
1811
|
try {
|
|
1677
1812
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1678
|
-
wasm.
|
|
1813
|
+
wasm.__wasm_bindgen_func_elem_3228(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1679
1814
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1680
1815
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1681
1816
|
if (r1) {
|
|
@@ -1686,8 +1821,8 @@ function __wasm_bindgen_func_elem_3011(arg0, arg1, arg2) {
|
|
|
1686
1821
|
}
|
|
1687
1822
|
}
|
|
1688
1823
|
|
|
1689
|
-
function
|
|
1690
|
-
wasm.
|
|
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));
|
|
1691
1826
|
}
|
|
1692
1827
|
|
|
1693
1828
|
const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/pkg/amba_core_bg.wasm
CHANGED
|
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;
|
|
@@ -67,6 +74,7 @@ export const ambacorewasm_leaguesCohort: (a: number) => number;
|
|
|
67
74
|
export const ambacorewasm_leaguesMe: (a: number) => number;
|
|
68
75
|
export const ambacorewasm_linkAccount: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
69
76
|
export const ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
77
|
+
export const ambacorewasm_linkEmailPassword: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
70
78
|
export const ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
71
79
|
export const ambacorewasm_me: (a: number) => number;
|
|
72
80
|
export const ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
@@ -79,6 +87,8 @@ export const ambacorewasm_messagingSendMessage: (a: number, b: number, c: number
|
|
|
79
87
|
export const ambacorewasm_moderationGetReportStatus: (a: number, b: number, c: number) => number;
|
|
80
88
|
export const ambacorewasm_moderationReportContent: (a: number, b: number, c: number) => number;
|
|
81
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;
|
|
82
92
|
export const ambacorewasm_onboardingComplete: (a: number) => number;
|
|
83
93
|
export const ambacorewasm_onboardingGetStatus: (a: number) => number;
|
|
84
94
|
export const ambacorewasm_onboardingNextStep: (a: number, b: number, c: number) => number;
|
|
@@ -134,9 +144,9 @@ export const ambacorewasm_verifySmsOtp: (a: number, b: number, c: number, d: num
|
|
|
134
144
|
export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
|
|
135
145
|
export const ambacorewasm_xpGetBalance: (a: number) => number;
|
|
136
146
|
export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
|
|
137
|
-
export const
|
|
138
|
-
export const
|
|
139
|
-
export const
|
|
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;
|
|
140
150
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
141
151
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
142
152
|
export const __wbindgen_export3: (a: number) => void;
|
package/pkg-rn/amba_core.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -115,6 +154,7 @@ export class AmbaCoreWasm {
|
|
|
115
154
|
leaguesMe(): Promise<any>;
|
|
116
155
|
linkAccount(provider: string, credential: string): Promise<any>;
|
|
117
156
|
linkEmailOtp(email: string, code: string): Promise<any>;
|
|
157
|
+
linkEmailPassword(email: string, password: string): Promise<any>;
|
|
118
158
|
linkSmsOtp(phone: string, code: string): Promise<any>;
|
|
119
159
|
me(): Promise<any>;
|
|
120
160
|
/**
|
|
@@ -161,6 +201,8 @@ export class AmbaCoreWasm {
|
|
|
161
201
|
moderationGetReportStatus(id: string): Promise<any>;
|
|
162
202
|
moderationReportContent(request_json: string): Promise<any>;
|
|
163
203
|
moderationReportUser(request_json: string): Promise<any>;
|
|
204
|
+
offeringsGet(offering_id: string): Promise<any>;
|
|
205
|
+
offeringsList(): Promise<any>;
|
|
164
206
|
onboardingComplete(): Promise<any>;
|
|
165
207
|
onboardingGetStatus(): Promise<any>;
|
|
166
208
|
onboardingNextStep(payload_json: string): Promise<any>;
|