@layers/amba-core 1.0.2 → 1.0.4

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": "1.0.2",
3
+ "version": "1.0.4",
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",
@@ -8,7 +8,10 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./pkg/amba_core.d.ts",
11
- "import": "./pkg/amba_core.js"
11
+ "react-native": "./pkg-rn/amba_core.js",
12
+ "browser": "./pkg/amba_core.js",
13
+ "import": "./pkg/amba_core.js",
14
+ "default": "./pkg/amba_core.js"
12
15
  },
13
16
  "./wasm": "./pkg/amba_core_bg.wasm"
14
17
  },
@@ -17,10 +20,16 @@
17
20
  "pkg/amba_core_bg.wasm",
18
21
  "pkg/amba_core.d.ts",
19
22
  "pkg/amba_core_bg.wasm.d.ts",
23
+ "pkg-rn/amba_core.js",
24
+ "pkg-rn/amba_core_bg.js",
25
+ "pkg-rn/amba_core_bg.wasm.js",
26
+ "pkg-rn/amba_core.d.ts",
27
+ "pkg-rn/amba_core_bg.wasm.d.ts",
20
28
  "README.md"
21
29
  ],
22
30
  "sideEffects": [
23
- "./pkg/snippets/*"
31
+ "./pkg/snippets/*",
32
+ "./pkg-rn/amba_core_bg.wasm.js"
24
33
  ],
25
34
  "license": "MIT",
26
35
  "repository": {
@@ -31,11 +40,16 @@
31
40
  "publishConfig": {
32
41
  "access": "public"
33
42
  },
43
+ "devDependencies": {
44
+ "binaryen": "129.0.0"
45
+ },
34
46
  "engines": {
35
47
  "node": ">=20.0.0"
36
48
  },
37
49
  "scripts": {
38
- "build": "wasm-pack build ../../core --target web --out-name amba_core --out-dir ../packages/core/pkg && node ./scripts/verify-pkg.mjs",
50
+ "build": "pnpm run build:web && pnpm run build:rn && node ./scripts/verify-pkg.mjs",
51
+ "build:web": "wasm-pack build ../../core --target web --out-name amba_core --out-dir ../packages/core/pkg",
52
+ "build:rn": "node ./scripts/build-rn.mjs",
39
53
  "build:bundler": "wasm-pack build ../../core --target bundler --out-name amba_core --out-dir ../packages/core/pkg-bundler",
40
54
  "build:nodejs": "wasm-pack build ../../core --target nodejs --out-name amba_core --out-dir ../packages/core/pkg-node",
41
55
  "verify:pkg": "node ./scripts/verify-pkg.mjs"
@@ -82,8 +82,33 @@ export class AmbaCoreWasm {
82
82
  leaderboardsGetEntries(key: string, limit?: number | null): Promise<any>;
83
83
  leaderboardsGetMyRank(key: string): Promise<any>;
84
84
  me(): Promise<any>;
85
+ /**
86
+ * `POST /v1/client/messaging/conversations` — create (or fetch the
87
+ * existing direct) conversation. JS payload is the same JSON the
88
+ * server accepts (`participant_ids`, optional `type`, optional
89
+ * `name`).
90
+ */
91
+ messagingCreateConversation(request_json: string): Promise<any>;
85
92
  messagingGetConversations(): Promise<any>;
86
- messagingGetMessage(id: string): Promise<any>;
93
+ /**
94
+ * `GET /v1/client/messaging/conversations/:id/messages` — list
95
+ * messages in a conversation. `limit` and `offset` are emitted as
96
+ * query params when present.
97
+ */
98
+ messagingListMessages(conversation_id: string, limit?: number | null, offset?: number | null): Promise<any>;
99
+ /**
100
+ * `POST /v1/client/messaging/conversations/:id/read` — bump the
101
+ * caller's `last_read_at` on the conversation.
102
+ */
103
+ messagingMarkRead(conversation_id: string): Promise<any>;
104
+ /**
105
+ * `POST /v1/client/messaging/conversations/:id/messages` — send a
106
+ * message. The `conversation_id` is a path arg server-side; FFI
107
+ * callers pass it inside the request JSON (`{"conversation_id":
108
+ * ..., "body": ...}`) for ABI stability. JS bindings that prefer
109
+ * the cleaner two-positional shape can wrap this — see the
110
+ * TypeScript `Amba.messaging.sendMessage` surface.
111
+ */
87
112
  messagingSendMessage(request_json: string): Promise<any>;
88
113
  moderationGetReportStatus(id: string): Promise<any>;
89
114
  moderationReportContent(request_json: string): Promise<any>;
@@ -186,8 +211,10 @@ export interface InitOutput {
186
211
  readonly ambacorewasm_leaderboardsGetEntries: (a: number, b: number, c: number, d: number) => number;
187
212
  readonly ambacorewasm_leaderboardsGetMyRank: (a: number, b: number, c: number) => number;
188
213
  readonly ambacorewasm_me: (a: number) => number;
214
+ readonly ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
189
215
  readonly ambacorewasm_messagingGetConversations: (a: number) => number;
190
- readonly ambacorewasm_messagingGetMessage: (a: number, b: number, c: number) => number;
216
+ readonly ambacorewasm_messagingListMessages: (a: number, b: number, c: number, d: number, e: number) => number;
217
+ readonly ambacorewasm_messagingMarkRead: (a: number, b: number, c: number) => number;
191
218
  readonly ambacorewasm_messagingSendMessage: (a: number, b: number, c: number) => number;
192
219
  readonly ambacorewasm_moderationGetReportStatus: (a: number, b: number, c: number) => number;
193
220
  readonly ambacorewasm_moderationReportContent: (a: number, b: number, c: number) => number;
@@ -228,9 +255,9 @@ export interface InitOutput {
228
255
  readonly ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
229
256
  readonly ambacorewasm_xpGetBalance: (a: number) => number;
230
257
  readonly ambacorewasm_xpGetHistory: (a: number, b: number) => number;
231
- readonly __wasm_bindgen_func_elem_2351: (a: number, b: number, c: number, d: number) => void;
232
- readonly __wasm_bindgen_func_elem_2347: (a: number, b: number, c: number, d: number) => void;
233
- readonly __wasm_bindgen_func_elem_2351_96: (a: number, b: number, c: number, d: number) => void;
258
+ readonly __wasm_bindgen_func_elem_2396: (a: number, b: number, c: number, d: number) => void;
259
+ readonly __wasm_bindgen_func_elem_2392: (a: number, b: number, c: number, d: number) => void;
260
+ readonly __wasm_bindgen_func_elem_2396_98: (a: number, b: number, c: number, d: number) => void;
234
261
  readonly __wbindgen_export: (a: number, b: number) => number;
235
262
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
236
263
  readonly __wbindgen_export3: (a: number) => void;
package/pkg/amba_core.js CHANGED
@@ -585,6 +585,20 @@ export class AmbaCoreWasm {
585
585
  const ret = wasm.ambacorewasm_me(this.__wbg_ptr);
586
586
  return takeObject(ret);
587
587
  }
588
+ /**
589
+ * `POST /v1/client/messaging/conversations` — create (or fetch the
590
+ * existing direct) conversation. JS payload is the same JSON the
591
+ * server accepts (`participant_ids`, optional `type`, optional
592
+ * `name`).
593
+ * @param {string} request_json
594
+ * @returns {Promise<any>}
595
+ */
596
+ messagingCreateConversation(request_json) {
597
+ const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
598
+ const len0 = WASM_VECTOR_LEN;
599
+ const ret = wasm.ambacorewasm_messagingCreateConversation(this.__wbg_ptr, ptr0, len0);
600
+ return takeObject(ret);
601
+ }
588
602
  /**
589
603
  * @returns {Promise<any>}
590
604
  */
@@ -593,16 +607,39 @@ export class AmbaCoreWasm {
593
607
  return takeObject(ret);
594
608
  }
595
609
  /**
596
- * @param {string} id
610
+ * `GET /v1/client/messaging/conversations/:id/messages` — list
611
+ * messages in a conversation. `limit` and `offset` are emitted as
612
+ * query params when present.
613
+ * @param {string} conversation_id
614
+ * @param {number | null} [limit]
615
+ * @param {number | null} [offset]
597
616
  * @returns {Promise<any>}
598
617
  */
599
- messagingGetMessage(id) {
600
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
618
+ messagingListMessages(conversation_id, limit, offset) {
619
+ const ptr0 = passStringToWasm0(conversation_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
601
620
  const len0 = WASM_VECTOR_LEN;
602
- const ret = wasm.ambacorewasm_messagingGetMessage(this.__wbg_ptr, ptr0, len0);
621
+ const ret = wasm.ambacorewasm_messagingListMessages(this.__wbg_ptr, ptr0, len0, isLikeNone(limit) ? Number.MAX_SAFE_INTEGER : (limit) >>> 0, isLikeNone(offset) ? Number.MAX_SAFE_INTEGER : (offset) >>> 0);
603
622
  return takeObject(ret);
604
623
  }
605
624
  /**
625
+ * `POST /v1/client/messaging/conversations/:id/read` — bump the
626
+ * caller's `last_read_at` on the conversation.
627
+ * @param {string} conversation_id
628
+ * @returns {Promise<any>}
629
+ */
630
+ messagingMarkRead(conversation_id) {
631
+ const ptr0 = passStringToWasm0(conversation_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
632
+ const len0 = WASM_VECTOR_LEN;
633
+ const ret = wasm.ambacorewasm_messagingMarkRead(this.__wbg_ptr, ptr0, len0);
634
+ return takeObject(ret);
635
+ }
636
+ /**
637
+ * `POST /v1/client/messaging/conversations/:id/messages` — send a
638
+ * message. The `conversation_id` is a path arg server-side; FFI
639
+ * callers pass it inside the request JSON (`{"conversation_id":
640
+ * ..., "body": ...}`) for ABI stability. JS bindings that prefer
641
+ * the cleaner two-positional shape can wrap this — see the
642
+ * TypeScript `Amba.messaging.sendMessage` surface.
606
643
  * @param {string} request_json
607
644
  * @returns {Promise<any>}
608
645
  */
@@ -1098,6 +1135,10 @@ function __wbg_get_imports() {
1098
1135
  const ret = new Date();
1099
1136
  return addHeapObject(ret);
1100
1137
  },
1138
+ __wbg_new_1f236d63ba0c4784: function(arg0, arg1) {
1139
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1140
+ return addHeapObject(ret);
1141
+ },
1101
1142
  __wbg_new_310879b66b6e95e1: function() {
1102
1143
  const ret = new Array();
1103
1144
  return addHeapObject(ret);
@@ -1113,7 +1154,7 @@ function __wbg_get_imports() {
1113
1154
  const a = state0.a;
1114
1155
  state0.a = 0;
1115
1156
  try {
1116
- return __wasm_bindgen_func_elem_2351_96(a, state0.b, arg0, arg1);
1157
+ return __wasm_bindgen_func_elem_2396_98(a, state0.b, arg0, arg1);
1117
1158
  } finally {
1118
1159
  state0.a = a;
1119
1160
  }
@@ -1184,13 +1225,13 @@ function __wbg_get_imports() {
1184
1225
  return addHeapObject(ret);
1185
1226
  },
1186
1227
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1187
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 581, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1188
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2351);
1228
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 593, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1229
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2396);
1189
1230
  return addHeapObject(ret);
1190
1231
  },
1191
1232
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1192
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 576, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1193
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2347);
1233
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 588, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1234
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2392);
1194
1235
  return addHeapObject(ret);
1195
1236
  },
1196
1237
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1227,14 +1268,14 @@ function __wbg_get_imports() {
1227
1268
  };
1228
1269
  }
1229
1270
 
1230
- function __wasm_bindgen_func_elem_2351(arg0, arg1, arg2, arg3) {
1231
- wasm.__wasm_bindgen_func_elem_2351(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1271
+ function __wasm_bindgen_func_elem_2396(arg0, arg1, arg2, arg3) {
1272
+ wasm.__wasm_bindgen_func_elem_2396(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1232
1273
  }
1233
1274
 
1234
- function __wasm_bindgen_func_elem_2347(arg0, arg1, arg2) {
1275
+ function __wasm_bindgen_func_elem_2392(arg0, arg1, arg2) {
1235
1276
  try {
1236
1277
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1237
- wasm.__wasm_bindgen_func_elem_2347(retptr, arg0, arg1, addHeapObject(arg2));
1278
+ wasm.__wasm_bindgen_func_elem_2392(retptr, arg0, arg1, addHeapObject(arg2));
1238
1279
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1239
1280
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1240
1281
  if (r1) {
@@ -1245,8 +1286,8 @@ function __wasm_bindgen_func_elem_2347(arg0, arg1, arg2) {
1245
1286
  }
1246
1287
  }
1247
1288
 
1248
- function __wasm_bindgen_func_elem_2351_96(arg0, arg1, arg2, arg3) {
1249
- wasm.__wasm_bindgen_func_elem_2351_96(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1289
+ function __wasm_bindgen_func_elem_2396_98(arg0, arg1, arg2, arg3) {
1290
+ wasm.__wasm_bindgen_func_elem_2396_98(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1250
1291
  }
1251
1292
 
1252
1293
  const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
@@ -54,8 +54,10 @@ export const ambacorewasm_leaderboardsGet: (a: number, b: number, c: number) =>
54
54
  export const ambacorewasm_leaderboardsGetEntries: (a: number, b: number, c: number, d: number) => number;
55
55
  export const ambacorewasm_leaderboardsGetMyRank: (a: number, b: number, c: number) => number;
56
56
  export const ambacorewasm_me: (a: number) => number;
57
+ export const ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
57
58
  export const ambacorewasm_messagingGetConversations: (a: number) => number;
58
- export const ambacorewasm_messagingGetMessage: (a: number, b: number, c: number) => number;
59
+ export const ambacorewasm_messagingListMessages: (a: number, b: number, c: number, d: number, e: number) => number;
60
+ export const ambacorewasm_messagingMarkRead: (a: number, b: number, c: number) => number;
59
61
  export const ambacorewasm_messagingSendMessage: (a: number, b: number, c: number) => number;
60
62
  export const ambacorewasm_moderationGetReportStatus: (a: number, b: number, c: number) => number;
61
63
  export const ambacorewasm_moderationReportContent: (a: number, b: number, c: number) => number;
@@ -96,9 +98,9 @@ export const ambacorewasm_track: (a: number, b: number, c: number, d: number, e:
96
98
  export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
97
99
  export const ambacorewasm_xpGetBalance: (a: number) => number;
98
100
  export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
99
- export const __wasm_bindgen_func_elem_2351: (a: number, b: number, c: number, d: number) => void;
100
- export const __wasm_bindgen_func_elem_2347: (a: number, b: number, c: number, d: number) => void;
101
- export const __wasm_bindgen_func_elem_2351_96: (a: number, b: number, c: number, d: number) => void;
101
+ export const __wasm_bindgen_func_elem_2396: (a: number, b: number, c: number, d: number) => void;
102
+ export const __wasm_bindgen_func_elem_2392: (a: number, b: number, c: number, d: number) => void;
103
+ export const __wasm_bindgen_func_elem_2396_98: (a: number, b: number, c: number, d: number) => void;
102
104
  export const __wbindgen_export: (a: number, b: number) => number;
103
105
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
104
106
  export const __wbindgen_export3: (a: number) => void;
@@ -0,0 +1,155 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * JS-callable opaque handle to [`AmbaCore`].
6
+ *
7
+ * The JS side instantiates it via `AmbaCoreWasm.init(configJson, fetchFn)`
8
+ * and stashes it for the lifetime of the page.
9
+ */
10
+ export class AmbaCoreWasm {
11
+ private constructor();
12
+ free(): void;
13
+ [Symbol.dispose](): void;
14
+ achievementsGetAll(): Promise<any>;
15
+ achievementsGetProgress(): Promise<any>;
16
+ aiAnthropicMessages(request_json: string): Promise<any>;
17
+ anonymousId(): string;
18
+ appUserId(): string | undefined;
19
+ catalogList(): Promise<any>;
20
+ challengesClaim(id: string): Promise<any>;
21
+ challengesGet(id: string): Promise<any>;
22
+ challengesGetActive(): Promise<any>;
23
+ challengesGetProgress(id: string): Promise<any>;
24
+ collectionsDelete(collection: string, id: string): Promise<any>;
25
+ collectionsFind(collection: string, options_json: string): Promise<any>;
26
+ collectionsFindOne(collection: string, id: string): Promise<any>;
27
+ collectionsInsert(collection: string, row_json: string): Promise<any>;
28
+ collectionsUpdate(collection: string, id: string, set_json: string): Promise<any>;
29
+ configFetch(): Promise<any>;
30
+ contentCreateItem(channel: string, item_json: string): Promise<any>;
31
+ contentGetItem(id: string): Promise<any>;
32
+ /**
33
+ * `channel` is optional; `limit` caps results per page; `cursor` is
34
+ * the server-issued opaque pagination token. Mirror the TS wrapper
35
+ * signature: getLibrary(channel?, { limit?, cursor? }).
36
+ */
37
+ contentGetLibrary(channel?: string | null, limit?: number | null, cursor?: string | null): Promise<any>;
38
+ /**
39
+ * `channel` is optional; when omitted, FFI defaults to `"default"` so
40
+ * single-channel apps can call `Amba.content.getToday()` without args.
41
+ */
42
+ contentGetToday(channel?: string | null): Promise<any>;
43
+ contentUpdateItem(id: string, state_json: string): Promise<any>;
44
+ currenciesGetBalance(): Promise<any>;
45
+ currenciesGetTransactions(currency_key: string): Promise<any>;
46
+ deepLinksCreate(params_json: string): Promise<any>;
47
+ deepLinksGet(short_code: string): Promise<any>;
48
+ entitlementsHas(name: string): Promise<any>;
49
+ entitlementsList(): Promise<any>;
50
+ feedsGetActivity(feed?: string | null, cursor?: string | null): Promise<any>;
51
+ flagsFetch(): Promise<any>;
52
+ friendsBlockUser(user_id: string): Promise<any>;
53
+ friendsGetFriends(): Promise<any>;
54
+ friendsGetList(): Promise<any>;
55
+ friendsRemoveBlock(friendship_id: string): Promise<any>;
56
+ friendsUnblockUser(user_id: string): Promise<any>;
57
+ groupsCreate(params_json: string): Promise<any>;
58
+ groupsDelete(id: string): Promise<any>;
59
+ groupsGet(id: string): Promise<any>;
60
+ groupsGetMembers(id: string): Promise<any>;
61
+ groupsInvite(id: string, user_id: string): Promise<any>;
62
+ groupsJoin(id: string): Promise<any>;
63
+ groupsLeave(id: string): Promise<any>;
64
+ groupsUpdate(id: string, patch_json: string): Promise<any>;
65
+ /**
66
+ * Initialize the SDK.
67
+ *
68
+ * `config_json`: JSON-stringified `AmbaConfig` (api_key, base_url,
69
+ * sdk_platform, sdk_wrapper_version, consent_required, debug).
70
+ *
71
+ * `fetch_fn`: a JS function `(url, init) => Promise<Response>`
72
+ * matching the global `fetch` signature. The wrapper passes
73
+ * `window.fetch.bind(window)` or a server-side polyfill.
74
+ */
75
+ static init(config_json: string, fetch_fn: Function): AmbaCoreWasm;
76
+ inventoryConsume(request_json: string): Promise<any>;
77
+ inventoryGetItem(id: string): Promise<any>;
78
+ inventoryGetItems(): Promise<any>;
79
+ inventoryPurchase(request_json: string): Promise<any>;
80
+ isAuthenticated(): boolean;
81
+ leaderboardsGet(key: string): Promise<any>;
82
+ leaderboardsGetEntries(key: string, limit?: number | null): Promise<any>;
83
+ leaderboardsGetMyRank(key: string): Promise<any>;
84
+ me(): Promise<any>;
85
+ /**
86
+ * `POST /v1/client/messaging/conversations` — create (or fetch the
87
+ * existing direct) conversation. JS payload is the same JSON the
88
+ * server accepts (`participant_ids`, optional `type`, optional
89
+ * `name`).
90
+ */
91
+ messagingCreateConversation(request_json: string): Promise<any>;
92
+ messagingGetConversations(): Promise<any>;
93
+ /**
94
+ * `GET /v1/client/messaging/conversations/:id/messages` — list
95
+ * messages in a conversation. `limit` and `offset` are emitted as
96
+ * query params when present.
97
+ */
98
+ messagingListMessages(conversation_id: string, limit?: number | null, offset?: number | null): Promise<any>;
99
+ /**
100
+ * `POST /v1/client/messaging/conversations/:id/read` — bump the
101
+ * caller's `last_read_at` on the conversation.
102
+ */
103
+ messagingMarkRead(conversation_id: string): Promise<any>;
104
+ /**
105
+ * `POST /v1/client/messaging/conversations/:id/messages` — send a
106
+ * message. The `conversation_id` is a path arg server-side; FFI
107
+ * callers pass it inside the request JSON (`{"conversation_id":
108
+ * ..., "body": ...}`) for ABI stability. JS bindings that prefer
109
+ * the cleaner two-positional shape can wrap this — see the
110
+ * TypeScript `Amba.messaging.sendMessage` surface.
111
+ */
112
+ messagingSendMessage(request_json: string): Promise<any>;
113
+ moderationGetReportStatus(id: string): Promise<any>;
114
+ moderationReportContent(request_json: string): Promise<any>;
115
+ moderationReportUser(request_json: string): Promise<any>;
116
+ onboardingComplete(): Promise<any>;
117
+ onboardingGetStatus(): Promise<any>;
118
+ onboardingNextStep(payload_json: string): Promise<any>;
119
+ onboardingSkipStep(): Promise<any>;
120
+ pushGetTokens(): Promise<any>;
121
+ pushRegister(token: string, platform: string, bundle_id?: string | null): Promise<any>;
122
+ pushSubscribe(topic: string): Promise<any>;
123
+ pushUnregister(token: string): Promise<any>;
124
+ pushUnsubscribe(topic: string): Promise<any>;
125
+ referralsClaimReferral(code: string): Promise<any>;
126
+ referralsCreate(code?: string | null, max_uses?: number | null): Promise<any>;
127
+ referralsGetReferralCode(): Promise<any>;
128
+ refreshSession(): Promise<any>;
129
+ reviewsCreate(params_json: string): Promise<any>;
130
+ reviewsDelete(id: string): Promise<any>;
131
+ reviewsList(target_type: string, target_id: string): Promise<any>;
132
+ reviewsUpdate(id: string, patch_json: string): Promise<any>;
133
+ rolesGetMyRoles(): Promise<any>;
134
+ rolesHasPermission(permission: string): Promise<any>;
135
+ setDebug(enabled: boolean): void;
136
+ signInAnonymously(): Promise<any>;
137
+ signInWithEmail(email: string, password: string): Promise<any>;
138
+ signInWithSocial(provider: string, id_token: string): Promise<any>;
139
+ signOut(rotate_anonymous_id: boolean): Promise<any>;
140
+ signUpWithEmail(email: string, password: string): Promise<any>;
141
+ storageCommit(upload_id: string, asset_id: string): Promise<any>;
142
+ storagePresign(bucket: string, filename: string, mime_type: string, size_bytes: number, retention_days?: number | null): Promise<any>;
143
+ storesGetPurchaseOptions(store_key: string): Promise<any>;
144
+ storesList(): Promise<any>;
145
+ storesPurchase(store_key: string, purchase_option_id: string, receipt_json: string): Promise<any>;
146
+ streaksGetAll(): Promise<any>;
147
+ streaksQualify(streak_key: string): Promise<any>;
148
+ /**
149
+ * Track an event. Returns a Promise that resolves to undefined on success.
150
+ */
151
+ track(event: string, properties_json?: string | null): Promise<any>;
152
+ xpClaim(grant_key: string): Promise<any>;
153
+ xpGetBalance(): Promise<any>;
154
+ xpGetHistory(limit?: number | null): Promise<any>;
155
+ }
@@ -0,0 +1,9 @@
1
+ /* @ts-self-types="./amba_core.d.ts" */
2
+ import * as wasm from "./amba_core_bg.wasm.js";
3
+ import { __wbg_set_wasm } from "./amba_core_bg.js";
4
+
5
+ __wbg_set_wasm(wasm);
6
+
7
+ export {
8
+ AmbaCoreWasm
9
+ } from "./amba_core_bg.js";