@layers/amba-core 4.0.2 → 4.0.3
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 +10 -3
- package/pkg/amba_core.js +27 -11
- package/pkg/amba_core_bg.wasm +0 -0
- package/pkg/amba_core_bg.wasm.d.ts +4 -3
- package/pkg-rn/amba_core.d.ts +6 -0
- package/pkg-rn/amba_core_bg.js +27 -11
- package/pkg-rn/amba_core_bg.wasm.d.ts +4 -3
- package/pkg-rn/amba_core_bg.wasm.js +50253 -48085
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layers/amba-core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
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
|
@@ -117,6 +117,12 @@ export class AmbaCoreWasm {
|
|
|
117
117
|
linkEmailOtp(email: string, code: string): Promise<any>;
|
|
118
118
|
linkSmsOtp(phone: string, code: string): Promise<any>;
|
|
119
119
|
me(): Promise<any>;
|
|
120
|
+
/**
|
|
121
|
+
* `POST /v1/client/messaging/conversations/:id/participants` — add a
|
|
122
|
+
* participant to a conversation. The caller must already be a member
|
|
123
|
+
* (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
|
|
124
|
+
*/
|
|
125
|
+
messagingAddParticipant(conversation_id: string, user_id: string): Promise<any>;
|
|
120
126
|
/**
|
|
121
127
|
* `POST /v1/client/messaging/conversations` — create (or fetch the
|
|
122
128
|
* existing direct) conversation. JS payload is the same JSON the
|
|
@@ -306,6 +312,7 @@ export interface InitOutput {
|
|
|
306
312
|
readonly ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
307
313
|
readonly ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
308
314
|
readonly ambacorewasm_me: (a: number) => number;
|
|
315
|
+
readonly ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
309
316
|
readonly ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
|
|
310
317
|
readonly ambacorewasm_messagingGetConversations: (a: number) => number;
|
|
311
318
|
readonly ambacorewasm_messagingGetMessage: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
@@ -370,9 +377,9 @@ export interface InitOutput {
|
|
|
370
377
|
readonly ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
|
|
371
378
|
readonly ambacorewasm_xpGetBalance: (a: number) => number;
|
|
372
379
|
readonly ambacorewasm_xpGetHistory: (a: number, b: number) => number;
|
|
373
|
-
readonly
|
|
374
|
-
readonly
|
|
375
|
-
readonly
|
|
380
|
+
readonly __wasm_bindgen_func_elem_3030: (a: number, b: number, c: number, d: number) => void;
|
|
381
|
+
readonly __wasm_bindgen_func_elem_3011: (a: number, b: number, c: number, d: number) => void;
|
|
382
|
+
readonly __wasm_bindgen_func_elem_3030_134: (a: number, b: number, c: number, d: number) => void;
|
|
376
383
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
377
384
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
378
385
|
readonly __wbindgen_export3: (a: number) => void;
|
package/pkg/amba_core.js
CHANGED
|
@@ -750,6 +750,22 @@ export class AmbaCoreWasm {
|
|
|
750
750
|
const ret = wasm.ambacorewasm_me(this.__wbg_ptr);
|
|
751
751
|
return takeObject(ret);
|
|
752
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* `POST /v1/client/messaging/conversations/:id/participants` — add a
|
|
755
|
+
* participant to a conversation. The caller must already be a member
|
|
756
|
+
* (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
|
|
757
|
+
* @param {string} conversation_id
|
|
758
|
+
* @param {string} user_id
|
|
759
|
+
* @returns {Promise<any>}
|
|
760
|
+
*/
|
|
761
|
+
messagingAddParticipant(conversation_id, user_id) {
|
|
762
|
+
const ptr0 = passStringToWasm0(conversation_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
763
|
+
const len0 = WASM_VECTOR_LEN;
|
|
764
|
+
const ptr1 = passStringToWasm0(user_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
765
|
+
const len1 = WASM_VECTOR_LEN;
|
|
766
|
+
const ret = wasm.ambacorewasm_messagingAddParticipant(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
767
|
+
return takeObject(ret);
|
|
768
|
+
}
|
|
753
769
|
/**
|
|
754
770
|
* `POST /v1/client/messaging/conversations` — create (or fetch the
|
|
755
771
|
* existing direct) conversation. JS payload is the same JSON the
|
|
@@ -1538,7 +1554,7 @@ function __wbg_get_imports() {
|
|
|
1538
1554
|
const a = state0.a;
|
|
1539
1555
|
state0.a = 0;
|
|
1540
1556
|
try {
|
|
1541
|
-
return
|
|
1557
|
+
return __wasm_bindgen_func_elem_3030_134(a, state0.b, arg0, arg1);
|
|
1542
1558
|
} finally {
|
|
1543
1559
|
state0.a = a;
|
|
1544
1560
|
}
|
|
@@ -1609,13 +1625,13 @@ function __wbg_get_imports() {
|
|
|
1609
1625
|
return addHeapObject(ret);
|
|
1610
1626
|
},
|
|
1611
1627
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1612
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx:
|
|
1613
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1628
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 771, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1629
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3030);
|
|
1614
1630
|
return addHeapObject(ret);
|
|
1615
1631
|
},
|
|
1616
1632
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1617
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1618
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1633
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 760, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1634
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3011);
|
|
1619
1635
|
return addHeapObject(ret);
|
|
1620
1636
|
},
|
|
1621
1637
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -1652,14 +1668,14 @@ function __wbg_get_imports() {
|
|
|
1652
1668
|
};
|
|
1653
1669
|
}
|
|
1654
1670
|
|
|
1655
|
-
function
|
|
1656
|
-
wasm.
|
|
1671
|
+
function __wasm_bindgen_func_elem_3030(arg0, arg1, arg2, arg3) {
|
|
1672
|
+
wasm.__wasm_bindgen_func_elem_3030(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1657
1673
|
}
|
|
1658
1674
|
|
|
1659
|
-
function
|
|
1675
|
+
function __wasm_bindgen_func_elem_3011(arg0, arg1, arg2) {
|
|
1660
1676
|
try {
|
|
1661
1677
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1662
|
-
wasm.
|
|
1678
|
+
wasm.__wasm_bindgen_func_elem_3011(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1663
1679
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1664
1680
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1665
1681
|
if (r1) {
|
|
@@ -1670,8 +1686,8 @@ function __wasm_bindgen_func_elem_2991(arg0, arg1, arg2) {
|
|
|
1670
1686
|
}
|
|
1671
1687
|
}
|
|
1672
1688
|
|
|
1673
|
-
function
|
|
1674
|
-
wasm.
|
|
1689
|
+
function __wasm_bindgen_func_elem_3030_134(arg0, arg1, arg2, arg3) {
|
|
1690
|
+
wasm.__wasm_bindgen_func_elem_3030_134(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1675
1691
|
}
|
|
1676
1692
|
|
|
1677
1693
|
const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/pkg/amba_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -69,6 +69,7 @@ export const ambacorewasm_linkAccount: (a: number, b: number, c: number, d: numb
|
|
|
69
69
|
export const ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
70
70
|
export const ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
71
71
|
export const ambacorewasm_me: (a: number) => number;
|
|
72
|
+
export const ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
72
73
|
export const ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
|
|
73
74
|
export const ambacorewasm_messagingGetConversations: (a: number) => number;
|
|
74
75
|
export const ambacorewasm_messagingGetMessage: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
@@ -133,9 +134,9 @@ export const ambacorewasm_verifySmsOtp: (a: number, b: number, c: number, d: num
|
|
|
133
134
|
export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
|
|
134
135
|
export const ambacorewasm_xpGetBalance: (a: number) => number;
|
|
135
136
|
export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
|
|
136
|
-
export const
|
|
137
|
-
export const
|
|
138
|
-
export const
|
|
137
|
+
export const __wasm_bindgen_func_elem_3030: (a: number, b: number, c: number, d: number) => void;
|
|
138
|
+
export const __wasm_bindgen_func_elem_3011: (a: number, b: number, c: number, d: number) => void;
|
|
139
|
+
export const __wasm_bindgen_func_elem_3030_134: (a: number, b: number, c: number, d: number) => void;
|
|
139
140
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
140
141
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
141
142
|
export const __wbindgen_export3: (a: number) => void;
|
package/pkg-rn/amba_core.d.ts
CHANGED
|
@@ -117,6 +117,12 @@ export class AmbaCoreWasm {
|
|
|
117
117
|
linkEmailOtp(email: string, code: string): Promise<any>;
|
|
118
118
|
linkSmsOtp(phone: string, code: string): Promise<any>;
|
|
119
119
|
me(): Promise<any>;
|
|
120
|
+
/**
|
|
121
|
+
* `POST /v1/client/messaging/conversations/:id/participants` — add a
|
|
122
|
+
* participant to a conversation. The caller must already be a member
|
|
123
|
+
* (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
|
|
124
|
+
*/
|
|
125
|
+
messagingAddParticipant(conversation_id: string, user_id: string): Promise<any>;
|
|
120
126
|
/**
|
|
121
127
|
* `POST /v1/client/messaging/conversations` — create (or fetch the
|
|
122
128
|
* existing direct) conversation. JS payload is the same JSON the
|
package/pkg-rn/amba_core_bg.js
CHANGED
|
@@ -814,6 +814,22 @@ export class AmbaCoreWasm {
|
|
|
814
814
|
const ret = wasm.ambacorewasm_me(this.__wbg_ptr);
|
|
815
815
|
return takeObject(ret);
|
|
816
816
|
}
|
|
817
|
+
/**
|
|
818
|
+
* `POST /v1/client/messaging/conversations/:id/participants` — add a
|
|
819
|
+
* participant to a conversation. The caller must already be a member
|
|
820
|
+
* (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
|
|
821
|
+
* @param {string} conversation_id
|
|
822
|
+
* @param {string} user_id
|
|
823
|
+
* @returns {Promise<any>}
|
|
824
|
+
*/
|
|
825
|
+
messagingAddParticipant(conversation_id, user_id) {
|
|
826
|
+
const ptr0 = passStringToWasm0(conversation_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
827
|
+
const len0 = WASM_VECTOR_LEN;
|
|
828
|
+
const ptr1 = passStringToWasm0(user_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
829
|
+
const len1 = WASM_VECTOR_LEN;
|
|
830
|
+
const ret = wasm.ambacorewasm_messagingAddParticipant(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
831
|
+
return takeObject(ret);
|
|
832
|
+
}
|
|
817
833
|
/**
|
|
818
834
|
* `POST /v1/client/messaging/conversations` — create (or fetch the
|
|
819
835
|
* existing direct) conversation. JS payload is the same JSON the
|
|
@@ -1599,7 +1615,7 @@ export function __wbg_new_typed_c072c4ce9a2a0cdf(arg0, arg1) {
|
|
|
1599
1615
|
const a = state0.a;
|
|
1600
1616
|
state0.a = 0;
|
|
1601
1617
|
try {
|
|
1602
|
-
return
|
|
1618
|
+
return __wasm_bindgen_func_elem_3030_134(a, state0.b, arg0, arg1);
|
|
1603
1619
|
} finally {
|
|
1604
1620
|
state0.a = a;
|
|
1605
1621
|
}
|
|
@@ -1670,13 +1686,13 @@ export function __wbg_then_bd927500e8905df2(arg0, arg1, arg2) {
|
|
|
1670
1686
|
return addHeapObject(ret);
|
|
1671
1687
|
}
|
|
1672
1688
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1673
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx:
|
|
1674
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1689
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 771, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1690
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3030);
|
|
1675
1691
|
return addHeapObject(ret);
|
|
1676
1692
|
}
|
|
1677
1693
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1678
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1679
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1694
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 760, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1695
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3011);
|
|
1680
1696
|
return addHeapObject(ret);
|
|
1681
1697
|
}
|
|
1682
1698
|
export function __wbindgen_cast_0000000000000003(arg0) {
|
|
@@ -1706,14 +1722,14 @@ export function __wbindgen_object_clone_ref(arg0) {
|
|
|
1706
1722
|
export function __wbindgen_object_drop_ref(arg0) {
|
|
1707
1723
|
takeObject(arg0);
|
|
1708
1724
|
}
|
|
1709
|
-
function
|
|
1710
|
-
wasm.
|
|
1725
|
+
function __wasm_bindgen_func_elem_3030(arg0, arg1, arg2, arg3) {
|
|
1726
|
+
wasm.__wasm_bindgen_func_elem_3030(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1711
1727
|
}
|
|
1712
1728
|
|
|
1713
|
-
function
|
|
1729
|
+
function __wasm_bindgen_func_elem_3011(arg0, arg1, arg2) {
|
|
1714
1730
|
try {
|
|
1715
1731
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1716
|
-
wasm.
|
|
1732
|
+
wasm.__wasm_bindgen_func_elem_3011(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1717
1733
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1718
1734
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1719
1735
|
if (r1) {
|
|
@@ -1724,8 +1740,8 @@ function __wasm_bindgen_func_elem_2991(arg0, arg1, arg2) {
|
|
|
1724
1740
|
}
|
|
1725
1741
|
}
|
|
1726
1742
|
|
|
1727
|
-
function
|
|
1728
|
-
wasm.
|
|
1743
|
+
function __wasm_bindgen_func_elem_3030_134(arg0, arg1, arg2, arg3) {
|
|
1744
|
+
wasm.__wasm_bindgen_func_elem_3030_134(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1729
1745
|
}
|
|
1730
1746
|
|
|
1731
1747
|
const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -69,6 +69,7 @@ export const ambacorewasm_linkAccount: (a: number, b: number, c: number, d: numb
|
|
|
69
69
|
export const ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
70
70
|
export const ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
71
71
|
export const ambacorewasm_me: (a: number) => number;
|
|
72
|
+
export const ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
72
73
|
export const ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
|
|
73
74
|
export const ambacorewasm_messagingGetConversations: (a: number) => number;
|
|
74
75
|
export const ambacorewasm_messagingGetMessage: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
@@ -133,9 +134,9 @@ export const ambacorewasm_verifySmsOtp: (a: number, b: number, c: number, d: num
|
|
|
133
134
|
export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
|
|
134
135
|
export const ambacorewasm_xpGetBalance: (a: number) => number;
|
|
135
136
|
export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
|
|
136
|
-
export const
|
|
137
|
-
export const
|
|
138
|
-
export const
|
|
137
|
+
export const __wasm_bindgen_func_elem_3030: (a: number, b: number, c: number, d: number) => void;
|
|
138
|
+
export const __wasm_bindgen_func_elem_3011: (a: number, b: number, c: number, d: number) => void;
|
|
139
|
+
export const __wasm_bindgen_func_elem_3030_134: (a: number, b: number, c: number, d: number) => void;
|
|
139
140
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
140
141
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
141
142
|
export const __wbindgen_export3: (a: number) => void;
|