@layers/amba-core 4.0.2 → 4.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": "4.0.2",
3
+ "version": "4.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",
@@ -115,8 +115,15 @@ export class AmbaCoreWasm {
115
115
  leaguesMe(): Promise<any>;
116
116
  linkAccount(provider: string, credential: string): Promise<any>;
117
117
  linkEmailOtp(email: string, code: string): Promise<any>;
118
+ linkEmailPassword(email: string, password: string): Promise<any>;
118
119
  linkSmsOtp(phone: string, code: string): Promise<any>;
119
120
  me(): Promise<any>;
121
+ /**
122
+ * `POST /v1/client/messaging/conversations/:id/participants` — add a
123
+ * participant to a conversation. The caller must already be a member
124
+ * (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
125
+ */
126
+ messagingAddParticipant(conversation_id: string, user_id: string): Promise<any>;
120
127
  /**
121
128
  * `POST /v1/client/messaging/conversations` — create (or fetch the
122
129
  * existing direct) conversation. JS payload is the same JSON the
@@ -304,8 +311,10 @@ export interface InitOutput {
304
311
  readonly ambacorewasm_leaguesMe: (a: number) => number;
305
312
  readonly ambacorewasm_linkAccount: (a: number, b: number, c: number, d: number, e: number) => number;
306
313
  readonly ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
314
+ readonly ambacorewasm_linkEmailPassword: (a: number, b: number, c: number, d: number, e: number) => number;
307
315
  readonly ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
308
316
  readonly ambacorewasm_me: (a: number) => number;
317
+ readonly ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
309
318
  readonly ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
310
319
  readonly ambacorewasm_messagingGetConversations: (a: number) => number;
311
320
  readonly ambacorewasm_messagingGetMessage: (a: number, b: number, c: number, d: number, e: number) => number;
@@ -370,9 +379,9 @@ export interface InitOutput {
370
379
  readonly ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
371
380
  readonly ambacorewasm_xpGetBalance: (a: number) => number;
372
381
  readonly ambacorewasm_xpGetHistory: (a: number, b: number) => number;
373
- readonly __wasm_bindgen_func_elem_2995: (a: number, b: number, c: number, d: number) => void;
374
- readonly __wasm_bindgen_func_elem_2991: (a: number, b: number, c: number, d: number) => void;
375
- readonly __wasm_bindgen_func_elem_2995_133: (a: number, b: number, c: number, d: number) => void;
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;
376
385
  readonly __wbindgen_export: (a: number, b: number) => number;
377
386
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
378
387
  readonly __wbindgen_export3: (a: number) => void;
package/pkg/amba_core.js CHANGED
@@ -730,6 +730,19 @@ export class AmbaCoreWasm {
730
730
  const ret = wasm.ambacorewasm_linkEmailOtp(this.__wbg_ptr, ptr0, len0, ptr1, len1);
731
731
  return takeObject(ret);
732
732
  }
733
+ /**
734
+ * @param {string} email
735
+ * @param {string} password
736
+ * @returns {Promise<any>}
737
+ */
738
+ linkEmailPassword(email, password) {
739
+ const ptr0 = passStringToWasm0(email, wasm.__wbindgen_export, wasm.__wbindgen_export2);
740
+ const len0 = WASM_VECTOR_LEN;
741
+ const ptr1 = passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
742
+ const len1 = WASM_VECTOR_LEN;
743
+ const ret = wasm.ambacorewasm_linkEmailPassword(this.__wbg_ptr, ptr0, len0, ptr1, len1);
744
+ return takeObject(ret);
745
+ }
733
746
  /**
734
747
  * @param {string} phone
735
748
  * @param {string} code
@@ -750,6 +763,22 @@ export class AmbaCoreWasm {
750
763
  const ret = wasm.ambacorewasm_me(this.__wbg_ptr);
751
764
  return takeObject(ret);
752
765
  }
766
+ /**
767
+ * `POST /v1/client/messaging/conversations/:id/participants` — add a
768
+ * participant to a conversation. The caller must already be a member
769
+ * (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
770
+ * @param {string} conversation_id
771
+ * @param {string} user_id
772
+ * @returns {Promise<any>}
773
+ */
774
+ messagingAddParticipant(conversation_id, user_id) {
775
+ const ptr0 = passStringToWasm0(conversation_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
776
+ const len0 = WASM_VECTOR_LEN;
777
+ const ptr1 = passStringToWasm0(user_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
778
+ const len1 = WASM_VECTOR_LEN;
779
+ const ret = wasm.ambacorewasm_messagingAddParticipant(this.__wbg_ptr, ptr0, len0, ptr1, len1);
780
+ return takeObject(ret);
781
+ }
753
782
  /**
754
783
  * `POST /v1/client/messaging/conversations` — create (or fetch the
755
784
  * existing direct) conversation. JS payload is the same JSON the
@@ -1538,7 +1567,7 @@ function __wbg_get_imports() {
1538
1567
  const a = state0.a;
1539
1568
  state0.a = 0;
1540
1569
  try {
1541
- return __wasm_bindgen_func_elem_2995_133(a, state0.b, arg0, arg1);
1570
+ return __wasm_bindgen_func_elem_3036_135(a, state0.b, arg0, arg1);
1542
1571
  } finally {
1543
1572
  state0.a = a;
1544
1573
  }
@@ -1609,13 +1638,13 @@ function __wbg_get_imports() {
1609
1638
  return addHeapObject(ret);
1610
1639
  },
1611
1640
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1612
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 759, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1613
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2995);
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);
1614
1643
  return addHeapObject(ret);
1615
1644
  },
1616
1645
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1617
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 754, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1618
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2991);
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);
1619
1648
  return addHeapObject(ret);
1620
1649
  },
1621
1650
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1652,14 +1681,14 @@ function __wbg_get_imports() {
1652
1681
  };
1653
1682
  }
1654
1683
 
1655
- function __wasm_bindgen_func_elem_2995(arg0, arg1, arg2, arg3) {
1656
- wasm.__wasm_bindgen_func_elem_2995(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1684
+ function __wasm_bindgen_func_elem_3036(arg0, arg1, arg2, arg3) {
1685
+ wasm.__wasm_bindgen_func_elem_3036(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1657
1686
  }
1658
1687
 
1659
- function __wasm_bindgen_func_elem_2991(arg0, arg1, arg2) {
1688
+ function __wasm_bindgen_func_elem_3017(arg0, arg1, arg2) {
1660
1689
  try {
1661
1690
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1662
- wasm.__wasm_bindgen_func_elem_2991(retptr, arg0, arg1, addHeapObject(arg2));
1691
+ wasm.__wasm_bindgen_func_elem_3017(retptr, arg0, arg1, addHeapObject(arg2));
1663
1692
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1664
1693
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1665
1694
  if (r1) {
@@ -1670,8 +1699,8 @@ function __wasm_bindgen_func_elem_2991(arg0, arg1, arg2) {
1670
1699
  }
1671
1700
  }
1672
1701
 
1673
- function __wasm_bindgen_func_elem_2995_133(arg0, arg1, arg2, arg3) {
1674
- wasm.__wasm_bindgen_func_elem_2995_133(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
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));
1675
1704
  }
1676
1705
 
1677
1706
  const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
@@ -67,8 +67,10 @@ export const ambacorewasm_leaguesCohort: (a: number) => number;
67
67
  export const ambacorewasm_leaguesMe: (a: number) => number;
68
68
  export const ambacorewasm_linkAccount: (a: number, b: number, c: number, d: number, e: number) => number;
69
69
  export const ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
70
+ export const ambacorewasm_linkEmailPassword: (a: number, b: number, c: number, d: number, e: number) => number;
70
71
  export const ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
71
72
  export const ambacorewasm_me: (a: number) => number;
73
+ export const ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
72
74
  export const ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
73
75
  export const ambacorewasm_messagingGetConversations: (a: number) => number;
74
76
  export const ambacorewasm_messagingGetMessage: (a: number, b: number, c: number, d: number, e: number) => number;
@@ -133,9 +135,9 @@ export const ambacorewasm_verifySmsOtp: (a: number, b: number, c: number, d: num
133
135
  export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
134
136
  export const ambacorewasm_xpGetBalance: (a: number) => number;
135
137
  export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
136
- export const __wasm_bindgen_func_elem_2995: (a: number, b: number, c: number, d: number) => void;
137
- export const __wasm_bindgen_func_elem_2991: (a: number, b: number, c: number, d: number) => void;
138
- export const __wasm_bindgen_func_elem_2995_133: (a: number, b: number, c: number, d: number) => void;
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;
139
141
  export const __wbindgen_export: (a: number, b: number) => number;
140
142
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
141
143
  export const __wbindgen_export3: (a: number) => void;
@@ -115,8 +115,15 @@ export class AmbaCoreWasm {
115
115
  leaguesMe(): Promise<any>;
116
116
  linkAccount(provider: string, credential: string): Promise<any>;
117
117
  linkEmailOtp(email: string, code: string): Promise<any>;
118
+ linkEmailPassword(email: string, password: string): Promise<any>;
118
119
  linkSmsOtp(phone: string, code: string): Promise<any>;
119
120
  me(): Promise<any>;
121
+ /**
122
+ * `POST /v1/client/messaging/conversations/:id/participants` — add a
123
+ * participant to a conversation. The caller must already be a member
124
+ * (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
125
+ */
126
+ messagingAddParticipant(conversation_id: string, user_id: string): Promise<any>;
120
127
  /**
121
128
  * `POST /v1/client/messaging/conversations` — create (or fetch the
122
129
  * existing direct) conversation. JS payload is the same JSON the
@@ -794,6 +794,19 @@ export class AmbaCoreWasm {
794
794
  const ret = wasm.ambacorewasm_linkEmailOtp(this.__wbg_ptr, ptr0, len0, ptr1, len1);
795
795
  return takeObject(ret);
796
796
  }
797
+ /**
798
+ * @param {string} email
799
+ * @param {string} password
800
+ * @returns {Promise<any>}
801
+ */
802
+ linkEmailPassword(email, password) {
803
+ const ptr0 = passStringToWasm0(email, wasm.__wbindgen_export, wasm.__wbindgen_export2);
804
+ const len0 = WASM_VECTOR_LEN;
805
+ const ptr1 = passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
806
+ const len1 = WASM_VECTOR_LEN;
807
+ const ret = wasm.ambacorewasm_linkEmailPassword(this.__wbg_ptr, ptr0, len0, ptr1, len1);
808
+ return takeObject(ret);
809
+ }
797
810
  /**
798
811
  * @param {string} phone
799
812
  * @param {string} code
@@ -814,6 +827,22 @@ export class AmbaCoreWasm {
814
827
  const ret = wasm.ambacorewasm_me(this.__wbg_ptr);
815
828
  return takeObject(ret);
816
829
  }
830
+ /**
831
+ * `POST /v1/client/messaging/conversations/:id/participants` — add a
832
+ * participant to a conversation. The caller must already be a member
833
+ * (server enforces `NOT_A_PARTICIPANT`); idempotent server-side.
834
+ * @param {string} conversation_id
835
+ * @param {string} user_id
836
+ * @returns {Promise<any>}
837
+ */
838
+ messagingAddParticipant(conversation_id, user_id) {
839
+ const ptr0 = passStringToWasm0(conversation_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
840
+ const len0 = WASM_VECTOR_LEN;
841
+ const ptr1 = passStringToWasm0(user_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
842
+ const len1 = WASM_VECTOR_LEN;
843
+ const ret = wasm.ambacorewasm_messagingAddParticipant(this.__wbg_ptr, ptr0, len0, ptr1, len1);
844
+ return takeObject(ret);
845
+ }
817
846
  /**
818
847
  * `POST /v1/client/messaging/conversations` — create (or fetch the
819
848
  * existing direct) conversation. JS payload is the same JSON the
@@ -1599,7 +1628,7 @@ export function __wbg_new_typed_c072c4ce9a2a0cdf(arg0, arg1) {
1599
1628
  const a = state0.a;
1600
1629
  state0.a = 0;
1601
1630
  try {
1602
- return __wasm_bindgen_func_elem_2995_133(a, state0.b, arg0, arg1);
1631
+ return __wasm_bindgen_func_elem_3036_135(a, state0.b, arg0, arg1);
1603
1632
  } finally {
1604
1633
  state0.a = a;
1605
1634
  }
@@ -1670,13 +1699,13 @@ export function __wbg_then_bd927500e8905df2(arg0, arg1, arg2) {
1670
1699
  return addHeapObject(ret);
1671
1700
  }
1672
1701
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
1673
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 759, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1674
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2995);
1702
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref, Externref], shim_idx: 774, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1703
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3036);
1675
1704
  return addHeapObject(ret);
1676
1705
  }
1677
1706
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
1678
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 754, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1679
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2991);
1707
+ // 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`.
1708
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3017);
1680
1709
  return addHeapObject(ret);
1681
1710
  }
1682
1711
  export function __wbindgen_cast_0000000000000003(arg0) {
@@ -1706,14 +1735,14 @@ export function __wbindgen_object_clone_ref(arg0) {
1706
1735
  export function __wbindgen_object_drop_ref(arg0) {
1707
1736
  takeObject(arg0);
1708
1737
  }
1709
- function __wasm_bindgen_func_elem_2995(arg0, arg1, arg2, arg3) {
1710
- wasm.__wasm_bindgen_func_elem_2995(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1738
+ function __wasm_bindgen_func_elem_3036(arg0, arg1, arg2, arg3) {
1739
+ wasm.__wasm_bindgen_func_elem_3036(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1711
1740
  }
1712
1741
 
1713
- function __wasm_bindgen_func_elem_2991(arg0, arg1, arg2) {
1742
+ function __wasm_bindgen_func_elem_3017(arg0, arg1, arg2) {
1714
1743
  try {
1715
1744
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1716
- wasm.__wasm_bindgen_func_elem_2991(retptr, arg0, arg1, addHeapObject(arg2));
1745
+ wasm.__wasm_bindgen_func_elem_3017(retptr, arg0, arg1, addHeapObject(arg2));
1717
1746
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1718
1747
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1719
1748
  if (r1) {
@@ -1724,8 +1753,8 @@ function __wasm_bindgen_func_elem_2991(arg0, arg1, arg2) {
1724
1753
  }
1725
1754
  }
1726
1755
 
1727
- function __wasm_bindgen_func_elem_2995_133(arg0, arg1, arg2, arg3) {
1728
- wasm.__wasm_bindgen_func_elem_2995_133(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1756
+ function __wasm_bindgen_func_elem_3036_135(arg0, arg1, arg2, arg3) {
1757
+ wasm.__wasm_bindgen_func_elem_3036_135(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1729
1758
  }
1730
1759
 
1731
1760
  const AmbaCoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -67,8 +67,10 @@ export const ambacorewasm_leaguesCohort: (a: number) => number;
67
67
  export const ambacorewasm_leaguesMe: (a: number) => number;
68
68
  export const ambacorewasm_linkAccount: (a: number, b: number, c: number, d: number, e: number) => number;
69
69
  export const ambacorewasm_linkEmailOtp: (a: number, b: number, c: number, d: number, e: number) => number;
70
+ export const ambacorewasm_linkEmailPassword: (a: number, b: number, c: number, d: number, e: number) => number;
70
71
  export const ambacorewasm_linkSmsOtp: (a: number, b: number, c: number, d: number, e: number) => number;
71
72
  export const ambacorewasm_me: (a: number) => number;
73
+ export const ambacorewasm_messagingAddParticipant: (a: number, b: number, c: number, d: number, e: number) => number;
72
74
  export const ambacorewasm_messagingCreateConversation: (a: number, b: number, c: number) => number;
73
75
  export const ambacorewasm_messagingGetConversations: (a: number) => number;
74
76
  export const ambacorewasm_messagingGetMessage: (a: number, b: number, c: number, d: number, e: number) => number;
@@ -133,9 +135,9 @@ export const ambacorewasm_verifySmsOtp: (a: number, b: number, c: number, d: num
133
135
  export const ambacorewasm_xpClaim: (a: number, b: number, c: number) => number;
134
136
  export const ambacorewasm_xpGetBalance: (a: number) => number;
135
137
  export const ambacorewasm_xpGetHistory: (a: number, b: number) => number;
136
- export const __wasm_bindgen_func_elem_2995: (a: number, b: number, c: number, d: number) => void;
137
- export const __wasm_bindgen_func_elem_2991: (a: number, b: number, c: number, d: number) => void;
138
- export const __wasm_bindgen_func_elem_2995_133: (a: number, b: number, c: number, d: number) => void;
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;
139
141
  export const __wbindgen_export: (a: number, b: number) => number;
140
142
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
141
143
  export const __wbindgen_export3: (a: number) => void;