@de./sdk 1.0.4 → 2.0.0

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.
Files changed (383) hide show
  1. package/dist/allend/Access.d.ts +39 -3
  2. package/dist/allend/Access.js +147 -114
  3. package/dist/allend/Access.js.map +1 -1
  4. package/dist/allend/Agent/consolidation.d.ts +16 -0
  5. package/dist/allend/Agent/consolidation.js +38 -0
  6. package/dist/allend/Agent/consolidation.js.map +1 -0
  7. package/dist/allend/Agent/delivery.d.ts +11 -0
  8. package/dist/allend/Agent/delivery.js +43 -0
  9. package/dist/allend/Agent/delivery.js.map +1 -0
  10. package/dist/allend/Agent/dispatch.d.ts +8 -0
  11. package/dist/allend/Agent/dispatch.js +24 -0
  12. package/dist/allend/Agent/dispatch.js.map +1 -0
  13. package/dist/allend/Agent/index.d.ts +49 -0
  14. package/dist/allend/Agent/index.js +74 -0
  15. package/dist/allend/Agent/index.js.map +1 -0
  16. package/dist/allend/Agent/navigation.d.ts +8 -0
  17. package/dist/allend/Agent/navigation.js +25 -0
  18. package/dist/allend/Agent/navigation.js.map +1 -0
  19. package/dist/allend/Agent/origin.d.ts +9 -0
  20. package/dist/allend/Agent/origin.js +31 -0
  21. package/dist/allend/Agent/origin.js.map +1 -0
  22. package/dist/allend/Agent/reallocation.d.ts +7 -0
  23. package/dist/allend/Agent/reallocation.js +17 -0
  24. package/dist/allend/Agent/reallocation.js.map +1 -0
  25. package/dist/allend/Agent/realtime.d.ts +36 -0
  26. package/dist/allend/Agent/realtime.js +111 -0
  27. package/dist/allend/Agent/realtime.js.map +1 -0
  28. package/dist/allend/Agent/rides.d.ts +12 -0
  29. package/dist/allend/Agent/rides.js +51 -0
  30. package/dist/allend/Agent/rides.js.map +1 -0
  31. package/dist/allend/Agent/shipping.d.ts +11 -0
  32. package/dist/allend/Agent/shipping.js +43 -0
  33. package/dist/allend/Agent/shipping.js.map +1 -0
  34. package/dist/allend/CSP/analytics.d.ts +12 -0
  35. package/dist/allend/CSP/analytics.js +51 -0
  36. package/dist/allend/CSP/analytics.js.map +1 -0
  37. package/dist/allend/CSP/index.d.ts +25 -0
  38. package/dist/allend/CSP/index.js +43 -0
  39. package/dist/allend/CSP/index.js.map +1 -0
  40. package/dist/allend/CSP/inventory.d.ts +16 -0
  41. package/dist/allend/CSP/inventory.js +78 -0
  42. package/dist/allend/CSP/inventory.js.map +1 -0
  43. package/dist/allend/CSP/orders.d.ts +19 -0
  44. package/dist/allend/CSP/orders.js +97 -0
  45. package/dist/allend/CSP/orders.js.map +1 -0
  46. package/dist/allend/CSP/webhooks.d.ts +13 -0
  47. package/dist/allend/CSP/webhooks.js +56 -0
  48. package/dist/allend/CSP/webhooks.js.map +1 -0
  49. package/dist/allend/Customer/index.d.ts +27 -0
  50. package/dist/allend/Customer/index.js +39 -0
  51. package/dist/allend/Customer/index.js.map +1 -0
  52. package/dist/allend/Customer/intents.d.ts +12 -0
  53. package/dist/allend/Customer/intents.js +55 -0
  54. package/dist/allend/Customer/intents.js.map +1 -0
  55. package/dist/allend/Customer/orders.d.ts +11 -0
  56. package/dist/allend/Customer/orders.js +43 -0
  57. package/dist/allend/Customer/orders.js.map +1 -0
  58. package/dist/allend/Customer/rides.d.ts +12 -0
  59. package/dist/allend/Customer/rides.js +50 -0
  60. package/dist/allend/Customer/rides.js.map +1 -0
  61. package/dist/allend/DEV/developers.d.ts +11 -0
  62. package/dist/allend/DEV/developers.js +35 -0
  63. package/dist/allend/DEV/developers.js.map +1 -0
  64. package/dist/allend/DEV/index.d.ts +19 -0
  65. package/dist/allend/DEV/index.js +37 -0
  66. package/dist/allend/DEV/index.js.map +1 -0
  67. package/dist/allend/IoTClient.js +29 -35
  68. package/dist/allend/IoTClient.js.map +1 -1
  69. package/dist/allend/IoTSP/backend.d.ts +29 -0
  70. package/dist/allend/IoTSP/backend.js +75 -0
  71. package/dist/allend/IoTSP/backend.js.map +1 -0
  72. package/dist/allend/IoTSP/devices.d.ts +14 -0
  73. package/dist/allend/IoTSP/devices.js +61 -0
  74. package/dist/allend/IoTSP/devices.js.map +1 -0
  75. package/dist/allend/IoTSP/index.d.ts +28 -0
  76. package/dist/allend/IoTSP/index.js +84 -0
  77. package/dist/allend/IoTSP/index.js.map +1 -0
  78. package/dist/allend/IoTSP/rules.d.ts +17 -0
  79. package/dist/allend/IoTSP/rules.js +81 -0
  80. package/dist/allend/IoTSP/rules.js.map +1 -0
  81. package/dist/allend/IoTSP/topics.d.ts +17 -0
  82. package/dist/allend/IoTSP/topics.js +81 -0
  83. package/dist/allend/IoTSP/topics.js.map +1 -0
  84. package/dist/allend/LSP/agents.d.ts +20 -0
  85. package/dist/allend/LSP/agents.js +89 -0
  86. package/dist/allend/LSP/agents.js.map +1 -0
  87. package/dist/allend/LSP/carriers.d.ts +54 -0
  88. package/dist/allend/LSP/carriers.js +315 -0
  89. package/dist/allend/LSP/carriers.js.map +1 -0
  90. package/dist/allend/LSP/coverage.d.ts +44 -0
  91. package/dist/allend/LSP/coverage.js +135 -0
  92. package/dist/allend/LSP/coverage.js.map +1 -0
  93. package/dist/allend/LSP/fleets.d.ts +66 -0
  94. package/dist/allend/LSP/fleets.js +381 -0
  95. package/dist/allend/LSP/fleets.js.map +1 -0
  96. package/dist/allend/LSP/hubs.d.ts +39 -0
  97. package/dist/allend/LSP/hubs.js +186 -0
  98. package/dist/allend/LSP/hubs.js.map +1 -0
  99. package/dist/allend/LSP/index.d.ts +37 -0
  100. package/dist/allend/LSP/index.js +55 -0
  101. package/dist/allend/LSP/index.js.map +1 -0
  102. package/dist/allend/LSP/inventory.d.ts +13 -0
  103. package/dist/allend/LSP/inventory.js +56 -0
  104. package/dist/allend/LSP/inventory.js.map +1 -0
  105. package/dist/allend/LSP/operations.d.ts +47 -0
  106. package/dist/allend/LSP/operations.js +156 -0
  107. package/dist/allend/LSP/operations.js.map +1 -0
  108. package/dist/allend/LSP/orders.d.ts +69 -0
  109. package/dist/allend/LSP/orders.js +303 -0
  110. package/dist/allend/LSP/orders.js.map +1 -0
  111. package/dist/allend/LSP/pods.d.ts +26 -0
  112. package/dist/allend/LSP/pods.js +137 -0
  113. package/dist/allend/LSP/pods.js.map +1 -0
  114. package/dist/allend/LSP/pricing.d.ts +35 -0
  115. package/dist/allend/LSP/pricing.js +151 -0
  116. package/dist/allend/LSP/pricing.js.map +1 -0
  117. package/dist/allend/LSP/psl.d.ts +15 -0
  118. package/dist/allend/LSP/psl.js +68 -0
  119. package/dist/allend/LSP/psl.js.map +1 -0
  120. package/dist/allend/LSP/warehouses.d.ts +23 -0
  121. package/dist/allend/LSP/warehouses.js +94 -0
  122. package/dist/allend/LSP/warehouses.js.map +1 -0
  123. package/dist/allend/MSI/Controls.d.ts +9 -5
  124. package/dist/allend/MSI/Controls.js +269 -297
  125. package/dist/allend/MSI/Controls.js.map +1 -1
  126. package/dist/allend/MSI/Handles.d.ts +5 -4
  127. package/dist/allend/MSI/Handles.js +136 -233
  128. package/dist/allend/MSI/Handles.js.map +1 -1
  129. package/dist/allend/MSI/Plugins.d.ts +2 -2
  130. package/dist/allend/MSI/Plugins.js +12 -15
  131. package/dist/allend/MSI/Plugins.js.map +1 -1
  132. package/dist/allend/MSI/index.d.ts +4 -3
  133. package/dist/allend/MSI/index.js +123 -87
  134. package/dist/allend/MSI/index.js.map +1 -1
  135. package/dist/allend/MSI/native.d.ts +32 -0
  136. package/dist/allend/MSI/native.js +246 -0
  137. package/dist/allend/MSI/native.js.map +1 -0
  138. package/dist/allend/MSI/token.d.ts +12 -0
  139. package/dist/allend/MSI/token.js +21 -0
  140. package/dist/allend/MSI/token.js.map +1 -0
  141. package/dist/allend/OTPAuth/index.d.ts +77 -0
  142. package/dist/allend/OTPAuth/index.js +69 -0
  143. package/dist/allend/OTPAuth/index.js.map +1 -0
  144. package/dist/allend/Pipelines/analytics.d.ts +8 -0
  145. package/dist/allend/Pipelines/analytics.js +24 -0
  146. package/dist/allend/Pipelines/analytics.js.map +1 -0
  147. package/dist/allend/Pipelines/escalations.d.ts +8 -0
  148. package/dist/allend/Pipelines/escalations.js +25 -0
  149. package/dist/allend/Pipelines/escalations.js.map +1 -0
  150. package/dist/allend/Pipelines/executions.d.ts +11 -0
  151. package/dist/allend/Pipelines/executions.js +44 -0
  152. package/dist/allend/Pipelines/executions.js.map +1 -0
  153. package/dist/allend/Pipelines/index.d.ts +42 -0
  154. package/dist/allend/Pipelines/index.js +88 -0
  155. package/dist/allend/Pipelines/index.js.map +1 -0
  156. package/dist/allend/Pipelines/interventions.d.ts +8 -0
  157. package/dist/allend/Pipelines/interventions.js +25 -0
  158. package/dist/allend/Pipelines/interventions.js.map +1 -0
  159. package/dist/allend/Pipelines/monitor.d.ts +9 -0
  160. package/dist/allend/Pipelines/monitor.js +30 -0
  161. package/dist/allend/Pipelines/monitor.js.map +1 -0
  162. package/dist/allend/Pipelines/queries.d.ts +8 -0
  163. package/dist/allend/Pipelines/queries.js +25 -0
  164. package/dist/allend/Pipelines/queries.js.map +1 -0
  165. package/dist/allend/Pipelines/templates.d.ts +11 -0
  166. package/dist/allend/Pipelines/templates.js +46 -0
  167. package/dist/allend/Pipelines/templates.js.map +1 -0
  168. package/dist/allend/Pipelines/utils.d.ts +0 -0
  169. package/dist/allend/Pipelines/utils.js +2 -0
  170. package/dist/allend/Pipelines/utils.js.map +1 -0
  171. package/dist/allend/Pipelines/webhooks.d.ts +9 -0
  172. package/dist/allend/Pipelines/webhooks.js +35 -0
  173. package/dist/allend/Pipelines/webhooks.js.map +1 -0
  174. package/dist/allend/Pipelines/workers.d.ts +11 -0
  175. package/dist/allend/Pipelines/workers.js +45 -0
  176. package/dist/allend/Pipelines/workers.js.map +1 -0
  177. package/dist/allend/Queries/capacity.d.ts +11 -0
  178. package/dist/allend/Queries/capacity.js +44 -0
  179. package/dist/allend/Queries/capacity.js.map +1 -0
  180. package/dist/allend/Queries/discovery.d.ts +11 -0
  181. package/dist/allend/Queries/discovery.js +45 -0
  182. package/dist/allend/Queries/discovery.js.map +1 -0
  183. package/dist/allend/Queries/index.d.ts +27 -0
  184. package/dist/allend/Queries/index.js +40 -0
  185. package/dist/allend/Queries/index.js.map +1 -0
  186. package/dist/allend/Queries/matching.d.ts +7 -0
  187. package/dist/allend/Queries/matching.js +18 -0
  188. package/dist/allend/Queries/matching.js.map +1 -0
  189. package/dist/allend/Queries/performance.d.ts +9 -0
  190. package/dist/allend/Queries/performance.js +31 -0
  191. package/dist/allend/Queries/performance.js.map +1 -0
  192. package/dist/allend/Queries/pricing.d.ts +11 -0
  193. package/dist/allend/Queries/pricing.js +43 -0
  194. package/dist/allend/Queries/pricing.js.map +1 -0
  195. package/dist/allend/{DClient/Event.d.ts → Realtime/index.d.ts} +2 -6
  196. package/dist/allend/Realtime/index.js +62 -0
  197. package/dist/allend/Realtime/index.js.map +1 -0
  198. package/dist/allend/Shared/account.d.ts +10 -0
  199. package/dist/allend/Shared/account.js +22 -0
  200. package/dist/allend/Shared/account.js.map +1 -0
  201. package/dist/allend/Shared/buckets.d.ts +21 -0
  202. package/dist/allend/Shared/buckets.js +95 -0
  203. package/dist/allend/Shared/buckets.js.map +1 -0
  204. package/dist/allend/Shared/context.d.ts +14 -0
  205. package/dist/allend/Shared/context.js +33 -0
  206. package/dist/allend/Shared/context.js.map +1 -0
  207. package/dist/allend/Shared/faqs.d.ts +20 -0
  208. package/dist/allend/Shared/faqs.js +87 -0
  209. package/dist/allend/Shared/faqs.js.map +1 -0
  210. package/dist/allend/Shared/invitation.d.ts +42 -0
  211. package/dist/allend/Shared/invitation.js +40 -0
  212. package/dist/allend/Shared/invitation.js.map +1 -0
  213. package/dist/allend/Shared/operators.d.ts +39 -0
  214. package/dist/allend/Shared/operators.js +37 -0
  215. package/dist/allend/Shared/operators.js.map +1 -0
  216. package/dist/allend/Shared/users.d.ts +11 -0
  217. package/dist/allend/Shared/users.js +29 -0
  218. package/dist/allend/Shared/users.js.map +1 -0
  219. package/dist/allend/Tracking/index.d.ts +17 -0
  220. package/dist/allend/Tracking/index.js +39 -0
  221. package/dist/allend/Tracking/index.js.map +1 -0
  222. package/dist/allend/Utilities/common.d.ts +12 -0
  223. package/dist/allend/Utilities/common.js +53 -0
  224. package/dist/allend/Utilities/common.js.map +1 -0
  225. package/dist/allend/Utilities/fares.d.ts +10 -0
  226. package/dist/allend/Utilities/fares.js +39 -0
  227. package/dist/allend/Utilities/fares.js.map +1 -0
  228. package/dist/allend/Utilities/index.d.ts +23 -0
  229. package/dist/allend/Utilities/index.js +36 -0
  230. package/dist/allend/Utilities/index.js.map +1 -0
  231. package/dist/allend/Utilities/nearby.d.ts +9 -0
  232. package/dist/allend/Utilities/nearby.js +32 -0
  233. package/dist/allend/Utilities/nearby.js.map +1 -0
  234. package/dist/allend/Workflows/Client.d.ts +17 -0
  235. package/dist/allend/Workflows/Client.js +50 -0
  236. package/dist/allend/Workflows/Client.js.map +1 -0
  237. package/dist/allend/Workflows/Delivery.d.ts +36 -0
  238. package/dist/allend/Workflows/Delivery.js +16 -0
  239. package/dist/allend/Workflows/Delivery.js.map +1 -0
  240. package/dist/allend/Workflows/index.d.ts +11 -0
  241. package/dist/allend/Workflows/index.js +25 -0
  242. package/dist/allend/Workflows/index.js.map +1 -0
  243. package/dist/allend/Workspace/index.d.ts +162 -0
  244. package/dist/allend/Workspace/index.js +220 -0
  245. package/dist/allend/Workspace/index.js.map +1 -0
  246. package/dist/allend/index.d.ts +8 -5
  247. package/dist/allend/index.js +15 -8
  248. package/dist/allend/index.js.map +1 -1
  249. package/dist/backend/Auth.d.ts +28 -4
  250. package/dist/backend/Auth.js +125 -245
  251. package/dist/backend/Auth.js.map +1 -1
  252. package/dist/baseUrl.d.ts +56 -0
  253. package/dist/baseUrl.js +72 -4
  254. package/dist/baseUrl.js.map +1 -1
  255. package/dist/core.d.ts +88 -0
  256. package/dist/core.js +121 -0
  257. package/dist/core.js.map +1 -0
  258. package/dist/error.d.ts +17 -0
  259. package/dist/error.js +26 -0
  260. package/dist/error.js.map +1 -0
  261. package/dist/index.d.ts +30 -12
  262. package/dist/index.js +38 -14
  263. package/dist/index.js.map +1 -1
  264. package/dist/react-native.d.ts +30 -0
  265. package/dist/react-native.js +55 -0
  266. package/dist/react-native.js.map +1 -0
  267. package/dist/types/access.d.ts +64 -7
  268. package/dist/types/auth.d.ts +17 -17
  269. package/dist/types/channel.d.ts +45 -0
  270. package/dist/types/index.d.ts +379 -237
  271. package/dist/utils/index.d.ts +25 -0
  272. package/dist/utils/index.js +11 -1
  273. package/dist/utils/index.js.map +1 -1
  274. package/dist/utils/stream.js +25 -26
  275. package/dist/utils/stream.js.map +1 -1
  276. package/package.json +38 -18
  277. package/src/allend/Access.ts +143 -13
  278. package/src/allend/Agent/consolidation.ts +43 -0
  279. package/src/allend/Agent/delivery.ts +51 -0
  280. package/src/allend/Agent/dispatch.ts +27 -0
  281. package/src/allend/Agent/index.ts +113 -0
  282. package/src/allend/Agent/navigation.ts +27 -0
  283. package/src/allend/Agent/origin.ts +36 -0
  284. package/src/allend/Agent/reallocation.ts +16 -0
  285. package/src/allend/Agent/realtime.ts +140 -0
  286. package/src/allend/Agent/rides.ts +61 -0
  287. package/src/allend/Agent/shipping.ts +51 -0
  288. package/src/allend/CSP/analytics.ts +61 -0
  289. package/src/allend/CSP/index.ts +57 -0
  290. package/src/allend/CSP/inventory.ts +96 -0
  291. package/src/allend/CSP/orders.ts +121 -0
  292. package/src/allend/CSP/webhooks.ts +68 -0
  293. package/src/allend/Customer/index.ts +56 -0
  294. package/src/allend/Customer/intents.ts +66 -0
  295. package/src/allend/Customer/orders.ts +51 -0
  296. package/src/allend/Customer/rides.ts +60 -0
  297. package/src/allend/DEV/developers.ts +42 -0
  298. package/src/allend/DEV/index.ts +48 -0
  299. package/src/allend/IoTSP/backend.ts +103 -0
  300. package/src/allend/IoTSP/devices.ts +74 -0
  301. package/src/allend/IoTSP/index.ts +69 -0
  302. package/src/allend/IoTSP/rules.ts +99 -0
  303. package/src/allend/IoTSP/topics.ts +99 -0
  304. package/src/allend/LSP/agents.ts +115 -0
  305. package/src/allend/LSP/carriers.ts +408 -0
  306. package/src/allend/LSP/coverage.ts +212 -0
  307. package/src/allend/LSP/fleets.ts +505 -0
  308. package/src/allend/LSP/hubs.ts +245 -0
  309. package/src/allend/LSP/index.ts +75 -0
  310. package/src/allend/LSP/inventory.ts +65 -0
  311. package/src/allend/LSP/operations.ts +202 -0
  312. package/src/allend/LSP/orders.ts +397 -0
  313. package/src/allend/LSP/pods.ts +176 -0
  314. package/src/allend/LSP/pricing.ts +192 -0
  315. package/src/allend/LSP/psl.ts +81 -0
  316. package/src/allend/LSP/warehouses.ts +118 -0
  317. package/src/allend/MSI/Controls.ts +109 -90
  318. package/src/allend/MSI/Handles.ts +24 -15
  319. package/src/allend/MSI/Plugins.ts +3 -3
  320. package/src/allend/MSI/index.ts +85 -16
  321. package/src/allend/MSI/native.tsx +314 -0
  322. package/src/allend/MSI/token.ts +20 -0
  323. package/src/allend/OTPAuth/index.ts +130 -0
  324. package/src/allend/Pipelines/analytics.ts +25 -0
  325. package/src/allend/Pipelines/escalations.ts +26 -0
  326. package/src/allend/Pipelines/executions.ts +51 -0
  327. package/src/allend/Pipelines/index.ts +125 -0
  328. package/src/allend/Pipelines/interventions.ts +27 -0
  329. package/src/allend/Pipelines/monitor.ts +33 -0
  330. package/src/allend/Pipelines/queries.ts +27 -0
  331. package/src/allend/Pipelines/templates.ts +51 -0
  332. package/src/allend/Pipelines/utils.ts +0 -0
  333. package/src/allend/Pipelines/webhooks.ts +36 -0
  334. package/src/allend/Pipelines/workers.ts +49 -0
  335. package/src/allend/Queries/capacity.ts +51 -0
  336. package/src/allend/Queries/discovery.ts +53 -0
  337. package/src/allend/Queries/index.ts +58 -0
  338. package/src/allend/Queries/matching.ts +16 -0
  339. package/src/allend/Queries/performance.ts +35 -0
  340. package/src/allend/Queries/pricing.ts +51 -0
  341. package/src/allend/{DClient/Event.ts → Realtime/index.ts} +23 -22
  342. package/src/allend/Shared/account.ts +24 -0
  343. package/src/allend/Shared/buckets.ts +117 -0
  344. package/src/allend/Shared/context.ts +36 -0
  345. package/src/allend/Shared/faqs.ts +106 -0
  346. package/src/allend/Shared/invitation.ts +77 -0
  347. package/src/allend/Shared/operators.ts +84 -0
  348. package/src/allend/Shared/users.ts +32 -0
  349. package/src/allend/Tracking/index.ts +48 -0
  350. package/src/allend/Utilities/common.ts +63 -0
  351. package/src/allend/Utilities/fares.ts +45 -0
  352. package/src/allend/Utilities/index.ts +52 -0
  353. package/src/allend/Utilities/nearby.ts +36 -0
  354. package/src/allend/{DClient → Workflows}/Client.ts +12 -22
  355. package/src/allend/Workflows/Delivery.ts +94 -0
  356. package/src/allend/Workflows/index.ts +31 -0
  357. package/src/allend/Workspace/index.ts +302 -0
  358. package/src/allend/index.ts +23 -10
  359. package/src/backend/Auth.ts +68 -35
  360. package/src/baseUrl.ts +81 -7
  361. package/src/core.ts +145 -0
  362. package/src/error.ts +27 -0
  363. package/src/index.ts +25 -17
  364. package/src/react-native.ts +43 -0
  365. package/src/types/access.d.ts +64 -7
  366. package/src/types/auth.d.ts +17 -17
  367. package/src/types/channel.d.ts +45 -0
  368. package/src/types/index.d.ts +379 -237
  369. package/src/utils/index.ts +33 -1
  370. package/dist/allend/DAuth/index.d.ts +0 -20
  371. package/dist/allend/DAuth/index.js +0 -92
  372. package/dist/allend/DAuth/index.js.map +0 -1
  373. package/dist/allend/DClient/Client.d.ts +0 -10
  374. package/dist/allend/DClient/Client.js +0 -144
  375. package/dist/allend/DClient/Client.js.map +0 -1
  376. package/dist/allend/DClient/Event.js +0 -100
  377. package/dist/allend/DClient/Event.js.map +0 -1
  378. package/dist/allend/DClient/Order.d.ts +0 -49
  379. package/dist/allend/DClient/Order.js +0 -601
  380. package/dist/allend/DClient/Order.js.map +0 -1
  381. package/dist/bundle.js +0 -1
  382. package/src/allend/DAuth/index.ts +0 -39
  383. package/src/allend/DClient/Order.ts +0 -452
package/dist/core.d.ts ADDED
@@ -0,0 +1,88 @@
1
+ export { default as Auth } from './backend/Auth';
2
+ export type { AuthConfig } from './backend/Auth';
3
+ export { default as OTPAuth } from './allend/OTPAuth';
4
+ export { default as Tracking } from './allend/Tracking';
5
+ export type { TrackingConfig } from './allend/Tracking';
6
+ export { default as Pipelines } from './allend/Pipelines';
7
+ export type { PipelinesConfig } from './allend/Pipelines';
8
+ export { default as LSP } from './allend/LSP';
9
+ export type { LSPConfig } from './allend/LSP';
10
+ export { default as CSP } from './allend/CSP';
11
+ export type { CSPConfig } from './allend/CSP';
12
+ export { default as DEV } from './allend/DEV';
13
+ export type { DEVConfig } from './allend/DEV';
14
+ export { default as IoTSP, Records as IoTBackendRecords } from './allend/IoTSP';
15
+ export type { IoTSPConfig } from './allend/IoTSP';
16
+ export { default as Workspace } from './allend/Workspace';
17
+ export type { WorkspaceConfig } from './allend/Workspace';
18
+ export { default as Realtime } from './allend/Realtime';
19
+ export { default as Workflows } from './allend/Workflows';
20
+ export type { WorkflowsConfig } from './allend/Workflows';
21
+ export { default as Utils } from './utils';
22
+ export { default as APIError } from './error';
23
+ export { default as IoTClient } from './allend/IoTClient';
24
+ export type { IoTClientOptions } from './allend/IoTClient';
25
+ export { default as Customer } from './allend/Customer';
26
+ export type { CustomerConfig } from './allend/Customer';
27
+ export { default as Agent } from './allend/Agent';
28
+ export type { AgentConfig } from './allend/Agent';
29
+ export type { AgentRealtimeContext } from './allend/Agent/realtime';
30
+ export { default as Queries } from './allend/Queries';
31
+ export type { QueriesConfig } from './allend/Queries';
32
+ export { default as Utilities } from './allend/Utilities';
33
+ export type { UtilitiesConfig } from './allend/Utilities';
34
+ export type { default as Controls } from './allend/MSI/Controls';
35
+ export type { default as Handles } from './allend/MSI/Handles';
36
+ export type { Plugin } from './allend/MSI/Plugins';
37
+ export type { Channel, Listener, AckFunction } from './types/channel';
38
+ export type { AccessOptions, UserSession } from './types/access';
39
+ export type * from './types';
40
+ import Auth from './backend/Auth';
41
+ import OTPAuth from './allend/OTPAuth';
42
+ import Pipelines from './allend/Pipelines';
43
+ import Realtime from './allend/Realtime';
44
+ import IoT from './allend/IoTSP/backend';
45
+ import LSP from './allend/LSP';
46
+ import CSP from './allend/CSP';
47
+ import DEV from './allend/DEV';
48
+ import IoTSP from './allend/IoTSP';
49
+ import Workspace from './allend/Workspace';
50
+ import Workflows from './allend/Workflows';
51
+ import Tracking from './allend/Tracking';
52
+ import IoTClient from './allend/IoTClient';
53
+ import Customer from './allend/Customer';
54
+ import Agent from './allend/Agent';
55
+ import Queries from './allend/Queries';
56
+ import Utilities from './allend/Utilities';
57
+ import Client from './allend/Workflows/Client';
58
+ declare const DClient: {
59
+ Client: typeof Client;
60
+ Event: typeof Realtime;
61
+ };
62
+ export { DClient };
63
+ export declare const core: {
64
+ Auth: typeof Auth;
65
+ OTPAuth: typeof OTPAuth;
66
+ Pipelines: typeof Pipelines;
67
+ Realtime: typeof Realtime;
68
+ IoT: typeof IoT;
69
+ LSP: typeof LSP;
70
+ CSP: typeof CSP;
71
+ DEV: typeof DEV;
72
+ IoTSP: typeof IoTSP;
73
+ Workspace: typeof Workspace;
74
+ Workflows: typeof Workflows;
75
+ Tracking: typeof Tracking;
76
+ Utils: {
77
+ Stream: typeof import("./utils/stream").default;
78
+ };
79
+ DClient: {
80
+ Client: typeof Client;
81
+ Event: typeof Realtime;
82
+ };
83
+ IoTClient: typeof IoTClient;
84
+ Customer: typeof Customer;
85
+ Agent: typeof Agent;
86
+ Queries: typeof Queries;
87
+ Utilities: typeof Utilities;
88
+ };
package/dist/core.js ADDED
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ // ─── @de./sdk — platform-neutral core ─────────────────────────────────────────
3
+ //
4
+ // Everything that runs unchanged on Node, in a browser and in React Native.
5
+ //
6
+ // The MSI gateway is deliberately absent: it is the one surface that needs a
7
+ // host-specific transport and mounting, so each entry point adds its own --
8
+ // `./index` (iframe + iframe.io) and `./react-native` (WebView + webview.io).
9
+ // Keeping it out of here is what stops the React Native module from being
10
+ // pulled into web and server bundles, where `react-native-webview` cannot
11
+ // resolve.
12
+ //
13
+ // Two-layer architecture:
14
+ //
15
+ // Layer 1 — Core : raw API mirror, 1:1 with de.arch endpoints.
16
+ // Layer 2 — Workflows: use-case composition, many API calls in one.
17
+ //
18
+ // ─────────────────────────────────────────────────────────────────────────────
19
+ var __importDefault = (this && this.__importDefault) || function (mod) {
20
+ return (mod && mod.__esModule) ? mod : { "default": mod };
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.core = exports.DClient = exports.Utilities = exports.Queries = exports.Agent = exports.Customer = exports.IoTClient = exports.APIError = exports.Utils = exports.Workflows = exports.Realtime = exports.Workspace = exports.IoTBackendRecords = exports.IoTSP = exports.DEV = exports.CSP = exports.LSP = exports.Pipelines = exports.Tracking = exports.OTPAuth = exports.Auth = void 0;
24
+ // ── Named exports (preferred — tree-shakeable) ────────────────────────────────
25
+ // Server-side auth: connector credentials → access token
26
+ var Auth_1 = require("./backend/Auth");
27
+ Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return __importDefault(Auth_1).default; } });
28
+ // Client-side OTP auth (de.auth service)
29
+ var OTPAuth_1 = require("./allend/OTPAuth");
30
+ Object.defineProperty(exports, "OTPAuth", { enumerable: true, get: function () { return __importDefault(OTPAuth_1).default; } });
31
+ // Shared tracking API (de.arch /tracking)
32
+ var Tracking_1 = require("./allend/Tracking");
33
+ Object.defineProperty(exports, "Tracking", { enumerable: true, get: function () { return __importDefault(Tracking_1).default; } });
34
+ var Pipelines_1 = require("./allend/Pipelines");
35
+ Object.defineProperty(exports, "Pipelines", { enumerable: true, get: function () { return __importDefault(Pipelines_1).default; } });
36
+ var LSP_1 = require("./allend/LSP");
37
+ Object.defineProperty(exports, "LSP", { enumerable: true, get: function () { return __importDefault(LSP_1).default; } });
38
+ var CSP_1 = require("./allend/CSP");
39
+ Object.defineProperty(exports, "CSP", { enumerable: true, get: function () { return __importDefault(CSP_1).default; } });
40
+ var DEV_1 = require("./allend/DEV");
41
+ Object.defineProperty(exports, "DEV", { enumerable: true, get: function () { return __importDefault(DEV_1).default; } });
42
+ // IoT service provider + IoT Backend socket client (de.iotb service)
43
+ var IoTSP_1 = require("./allend/IoTSP");
44
+ Object.defineProperty(exports, "IoTSP", { enumerable: true, get: function () { return __importDefault(IoTSP_1).default; } });
45
+ Object.defineProperty(exports, "IoTBackendRecords", { enumerable: true, get: function () { return IoTSP_1.Records; } });
46
+ var Workspace_1 = require("./allend/Workspace");
47
+ Object.defineProperty(exports, "Workspace", { enumerable: true, get: function () { return __importDefault(Workspace_1).default; } });
48
+ // Realtime socket client (de.arch / Socket)
49
+ var Realtime_1 = require("./allend/Realtime");
50
+ Object.defineProperty(exports, "Realtime", { enumerable: true, get: function () { return __importDefault(Realtime_1).default; } });
51
+ // Layer 2 — Workflows
52
+ var Workflows_1 = require("./allend/Workflows");
53
+ Object.defineProperty(exports, "Workflows", { enumerable: true, get: function () { return __importDefault(Workflows_1).default; } });
54
+ // Utilities
55
+ var utils_1 = require("./utils");
56
+ Object.defineProperty(exports, "Utils", { enumerable: true, get: function () { return __importDefault(utils_1).default; } });
57
+ var error_1 = require("./error");
58
+ Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return __importDefault(error_1).default; } });
59
+ // ── Client layer (allend) ─────────────────────────────────────────────────────
60
+ // DClient ({ Client, Event }), the IoT socket client, and the customer/agent/
61
+ // query surfaces.
62
+ //
63
+ // Imported from their own modules rather than the `./allend` barrel: that
64
+ // barrel re-exports the browser MSI, which would pull iframe.io into the React
65
+ // Native bundle. `yarn verify:entries` enforces this.
66
+ var IoTClient_1 = require("./allend/IoTClient");
67
+ Object.defineProperty(exports, "IoTClient", { enumerable: true, get: function () { return __importDefault(IoTClient_1).default; } });
68
+ var Customer_1 = require("./allend/Customer");
69
+ Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return __importDefault(Customer_1).default; } });
70
+ var Agent_1 = require("./allend/Agent");
71
+ Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return __importDefault(Agent_1).default; } });
72
+ var Queries_1 = require("./allend/Queries");
73
+ Object.defineProperty(exports, "Queries", { enumerable: true, get: function () { return __importDefault(Queries_1).default; } });
74
+ var Utilities_1 = require("./allend/Utilities");
75
+ Object.defineProperty(exports, "Utilities", { enumerable: true, get: function () { return __importDefault(Utilities_1).default; } });
76
+ // ── Namespace of the platform-neutral constructors ────────────────────────────
77
+ const Auth_2 = __importDefault(require("./backend/Auth"));
78
+ const OTPAuth_2 = __importDefault(require("./allend/OTPAuth"));
79
+ const Pipelines_2 = __importDefault(require("./allend/Pipelines"));
80
+ const Realtime_2 = __importDefault(require("./allend/Realtime"));
81
+ const backend_1 = __importDefault(require("./allend/IoTSP/backend"));
82
+ const LSP_2 = __importDefault(require("./allend/LSP"));
83
+ const CSP_2 = __importDefault(require("./allend/CSP"));
84
+ const DEV_2 = __importDefault(require("./allend/DEV"));
85
+ const IoTSP_2 = __importDefault(require("./allend/IoTSP"));
86
+ const Workspace_2 = __importDefault(require("./allend/Workspace"));
87
+ const Workflows_2 = __importDefault(require("./allend/Workflows"));
88
+ const Tracking_2 = __importDefault(require("./allend/Tracking"));
89
+ const utils_2 = __importDefault(require("./utils"));
90
+ const IoTClient_2 = __importDefault(require("./allend/IoTClient"));
91
+ const Customer_2 = __importDefault(require("./allend/Customer"));
92
+ const Agent_2 = __importDefault(require("./allend/Agent"));
93
+ const Queries_2 = __importDefault(require("./allend/Queries"));
94
+ const Utilities_2 = __importDefault(require("./allend/Utilities"));
95
+ const Client_1 = __importDefault(require("./allend/Workflows/Client"));
96
+ const Realtime_3 = __importDefault(require("./allend/Realtime"));
97
+ // DClient groups the workflow client with the realtime event channel
98
+ const DClient = { Client: Client_1.default, Event: Realtime_3.default };
99
+ exports.DClient = DClient;
100
+ exports.core = {
101
+ Auth: Auth_2.default,
102
+ OTPAuth: OTPAuth_2.default,
103
+ Pipelines: Pipelines_2.default,
104
+ Realtime: Realtime_2.default,
105
+ IoT: backend_1.default,
106
+ LSP: LSP_2.default,
107
+ CSP: CSP_2.default,
108
+ DEV: DEV_2.default,
109
+ IoTSP: IoTSP_2.default,
110
+ Workspace: Workspace_2.default,
111
+ Workflows: Workflows_2.default,
112
+ Tracking: Tracking_2.default,
113
+ Utils: utils_2.default,
114
+ DClient,
115
+ IoTClient: IoTClient_2.default,
116
+ Customer: Customer_2.default,
117
+ Agent: Agent_2.default,
118
+ Queries: Queries_2.default,
119
+ Utilities: Utilities_2.default
120
+ };
121
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,EAAE;AACF,4EAA4E;AAC5E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,0EAA0E;AAC1E,0EAA0E;AAC1E,WAAW;AACX,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,mEAAmE;AACnE,sEAAsE;AACtE,EAAE;AACF,gFAAgF;;;;;;AAEhF,iFAAiF;AAEjF,yDAAyD;AACzD,uCAAgD;AAAvC,6GAAA,OAAO,OAAQ;AAGxB,yCAAyC;AACzC,4CAAqD;AAA5C,mHAAA,OAAO,OAAW;AAE3B,0CAA0C;AAC1C,8CAAuD;AAA9C,qHAAA,OAAO,OAAY;AAG5B,gDAAyD;AAAhD,uHAAA,OAAO,OAAa;AAG7B,oCAA6C;AAApC,2GAAA,OAAO,OAAO;AAGvB,oCAA6C;AAApC,2GAAA,OAAO,OAAO;AAGvB,oCAA6C;AAApC,2GAAA,OAAO,OAAO;AAGvB,qEAAqE;AACrE,wCAA+E;AAAtE,+GAAA,OAAO,OAAS;AAAE,0GAAA,OAAO,OAAqB;AAGvD,gDAAyD;AAAhD,uHAAA,OAAO,OAAa;AAG7B,4CAA4C;AAC5C,8CAAuD;AAA9C,qHAAA,OAAO,OAAY;AAE5B,sBAAsB;AACtB,gDAAyD;AAAhD,uHAAA,OAAO,OAAa;AAG7B,YAAY;AACZ,iCAA0C;AAAjC,+GAAA,OAAO,OAAS;AAEzB,iCAA6C;AAApC,kHAAA,OAAO,OAAY;AAE5B,iFAAiF;AACjF,8EAA8E;AAC9E,kBAAkB;AAClB,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,sDAAsD;AACtD,gDAAyD;AAAhD,uHAAA,OAAO,OAAa;AAG7B,8CAAuD;AAA9C,qHAAA,OAAO,OAAY;AAG5B,wCAAiD;AAAxC,+GAAA,OAAO,OAAS;AAIzB,4CAAqD;AAA5C,mHAAA,OAAO,OAAW;AAG3B,gDAAyD;AAAhD,uHAAA,OAAO,OAAa;AAe7B,iFAAiF;AAEjF,0DAAsC;AACtC,+DAAwC;AACxC,mEAA0C;AAC1C,iEAAyC;AACzC,qEAA8C;AAC9C,uDAAoC;AACpC,uDAAoC;AACpC,uDAAoC;AACpC,2DAAsC;AACtC,mEAA0C;AAC1C,mEAA0C;AAC1C,iEAAyC;AACzC,oDAA+B;AAC/B,mEAA0C;AAC1C,iEAAyC;AACzC,2DAAsC;AACtC,+DAAwC;AACxC,mEAA0C;AAC1C,uEAAiD;AACjD,iEAAyC;AAEzC,qEAAqE;AACrE,MAAM,OAAO,GAAG,EAAE,MAAM,EAAN,gBAAM,EAAE,KAAK,EAAL,kBAAK,EAAE,CAAA;AACxB,0BAAO;AAEH,QAAA,IAAI,GAAG;IACnB,IAAI,EAAJ,cAAI;IACJ,OAAO,EAAP,iBAAO;IACP,SAAS,EAAT,mBAAS;IACT,QAAQ,EAAR,kBAAQ;IACR,GAAG,EAAH,iBAAG;IACH,GAAG,EAAH,aAAG;IACH,GAAG,EAAH,aAAG;IACH,GAAG,EAAH,aAAG;IACH,KAAK,EAAL,eAAK;IACL,SAAS,EAAT,mBAAS;IACT,SAAS,EAAT,mBAAS;IACT,QAAQ,EAAR,kBAAQ;IACR,KAAK,EAAL,eAAK;IACL,OAAO;IACP,SAAS,EAAT,mBAAS;IACT,QAAQ,EAAR,kBAAQ;IACR,KAAK,EAAL,eAAK;IACL,OAAO,EAAP,iBAAO;IACP,SAAS,EAAT,mBAAS;CACT,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A request De. answered with a failure.
3
+ *
4
+ * Every client threw on `error: true` already, but with a bare Error carrying
5
+ * only the message — so a caller could not tell an expired offer (404) from a
6
+ * rejected body (400) from De. being down (502) without parsing prose. A proxy
7
+ * mapping De.'s answer onto its own response had nothing to map, and a
8
+ * simulation counting ordinary 404s as ordinary had nothing to count.
9
+ *
10
+ * `status` is the HTTP status; `payload` is the envelope as it arrived, for
11
+ * the field-level detail a validation failure carries.
12
+ */
13
+ export default class APIError extends Error {
14
+ readonly status: number;
15
+ readonly payload?: unknown;
16
+ constructor(message: string, status: number, payload?: unknown);
17
+ }
package/dist/error.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * A request De. answered with a failure.
5
+ *
6
+ * Every client threw on `error: true` already, but with a bare Error carrying
7
+ * only the message — so a caller could not tell an expired offer (404) from a
8
+ * rejected body (400) from De. being down (502) without parsing prose. A proxy
9
+ * mapping De.'s answer onto its own response had nothing to map, and a
10
+ * simulation counting ordinary 404s as ordinary had nothing to count.
11
+ *
12
+ * `status` is the HTTP status; `payload` is the envelope as it arrived, for
13
+ * the field-level detail a validation failure carries.
14
+ */
15
+ class APIError extends Error {
16
+ constructor(message, status, payload) {
17
+ super(message);
18
+ this.name = 'APIError';
19
+ this.status = status;
20
+ this.payload = payload;
21
+ // Restores the prototype chain across the ES5 target, so `instanceof` holds
22
+ Object.setPrototypeOf(this, APIError.prototype);
23
+ }
24
+ }
25
+ exports.default = APIError;
26
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;GAWG;AACH,MAAqB,QAAS,SAAQ,KAAK;IAI1C,YAAa,OAAe,EAAE,MAAc,EAAE,OAAiB;QAC9D,KAAK,CAAE,OAAO,CAAE,CAAA;QAEhB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,4EAA4E;QAC5E,MAAM,CAAC,cAAc,CAAE,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAE,CAAA;IAClD,CAAC;CACD;AAdD,2BAcC"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,31 @@
1
- import Utils from './utils';
2
- import MSI, { type MSIInterface } from './allend/MSI';
3
- import IoTClient, { type IoTClientOptions } from './allend/IoTClient';
4
- import Order from './allend/DClient/Order';
5
- import Event from './allend/DClient/Event';
6
- import Client from './allend/DClient/Client';
7
- import Auth from './backend/Auth';
8
- declare const DClient: {
9
- Client: typeof Client;
10
- Order: typeof Order;
11
- Event: typeof Event;
1
+ export * from './core';
2
+ export { default as MSI, type MSIInterface } from './allend/MSI';
3
+ import MSI from './allend/MSI';
4
+ declare const De: {
5
+ MSI: typeof MSI;
6
+ Auth: typeof import("./core").Auth;
7
+ OTPAuth: typeof import("./core").OTPAuth;
8
+ Pipelines: typeof import("./core").Pipelines;
9
+ Realtime: typeof import("./core").Realtime;
10
+ IoT: typeof import("./allend/IoTSP/backend").default;
11
+ LSP: typeof import("./core").LSP;
12
+ CSP: typeof import("./core").CSP;
13
+ DEV: typeof import("./core").DEV;
14
+ IoTSP: typeof import("./core").IoTSP;
15
+ Workspace: typeof import("./core").Workspace;
16
+ Workflows: typeof import("./core").Workflows;
17
+ Tracking: typeof import("./core").Tracking;
18
+ Utils: {
19
+ Stream: typeof import("./utils/stream").default;
20
+ };
21
+ DClient: {
22
+ Client: typeof import("./allend/Workflows/Client").default;
23
+ Event: typeof import("./core").Realtime;
24
+ };
25
+ IoTClient: typeof import("./core").IoTClient;
26
+ Customer: typeof import("./core").Customer;
27
+ Agent: typeof import("./core").Agent;
28
+ Queries: typeof import("./core").Queries;
29
+ Utilities: typeof import("./core").Utilities;
12
30
  };
13
- export { Auth, MSI, type MSIInterface, Utils, DClient, IoTClient, type IoTClientOptions };
31
+ export default De;
package/dist/index.js CHANGED
@@ -1,20 +1,44 @@
1
1
  "use strict";
2
+ // ─── @de./sdk — web & server entry point ──────────────────────────────────────
3
+ //
4
+ // The platform-neutral core plus the browser MSI gateway (iframe + iframe.io).
5
+ //
6
+ // React Native consumers import '@de./sdk/react-native' instead, which pairs
7
+ // the same core with a WebView gateway. This module must never reference that
8
+ // one: it would drag react-native-webview into web and server bundles.
9
+ //
10
+ // import De from '@de./sdk'
11
+ // const msi = new De.MSI({ element: 'map', accessToken })
12
+ //
13
+ // ─────────────────────────────────────────────────────────────────────────────
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
2
28
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
29
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
30
  };
5
31
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.IoTClient = exports.DClient = exports.Utils = exports.MSI = exports.Auth = void 0;
7
- var utils_1 = __importDefault(require("./utils"));
8
- exports.Utils = utils_1.default;
9
- var MSI_1 = __importDefault(require("./allend/MSI"));
10
- exports.MSI = MSI_1.default;
11
- var IoTClient_1 = __importDefault(require("./allend/IoTClient"));
12
- exports.IoTClient = IoTClient_1.default;
13
- var Order_1 = __importDefault(require("./allend/DClient/Order"));
14
- var Event_1 = __importDefault(require("./allend/DClient/Event"));
15
- var Client_1 = __importDefault(require("./allend/DClient/Client"));
16
- var Auth_1 = __importDefault(require("./backend/Auth"));
17
- exports.Auth = Auth_1.default;
18
- var DClient = { Client: Client_1.default, Order: Order_1.default, Event: Event_1.default };
19
- exports.DClient = DClient;
32
+ exports.MSI = void 0;
33
+ __exportStar(require("./core"), exports);
34
+ // Map Service Interface (de.eui service) — browser gateway
35
+ var MSI_1 = require("./allend/MSI");
36
+ Object.defineProperty(exports, "MSI", { enumerable: true, get: function () { return __importDefault(MSI_1).default; } });
37
+ const MSI_2 = __importDefault(require("./allend/MSI"));
38
+ const core_1 = require("./core");
39
+ const De = {
40
+ ...core_1.core,
41
+ MSI: MSI_2.default
42
+ };
43
+ exports.default = De;
20
44
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA2B;AAczB,gBAdK,eAAK,CAcL;AAbP,qDAAqD;AAWnD,cAXK,aAAG,CAWL;AAVL,iEAAqE;AAcnE,oBAdK,mBAAS,CAcL;AAbX,iEAA0C;AAC1C,iEAA0C;AAC1C,mEAA4C;AAC5C,wDAAiC;AAK/B,eALK,cAAI,CAKL;AAHN,IAAM,OAAO,GAAG,EAAE,MAAM,kBAAA,EAAE,KAAK,iBAAA,EAAE,KAAK,iBAAA,EAAE,CAAA;AAOtC,0BAAO"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,EAAE;AACF,+EAA+E;AAC/E,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,8BAA8B;AAC9B,4DAA4D;AAC5D,EAAE;AACF,gFAAgF;;;;;;;;;;;;;;;;;;;;AAEhF,yCAAsB;AAEtB,2DAA2D;AAC3D,oCAAgE;AAAvD,2GAAA,OAAO,OAAO;AAEvB,uDAA8B;AAC9B,iCAA6B;AAE7B,MAAM,EAAE,GAAG;IACV,GAAG,WAAI;IACP,GAAG,EAAH,aAAG;CACH,CAAA;AAED,kBAAe,EAAE,CAAA"}
@@ -0,0 +1,30 @@
1
+ export * from './core';
2
+ export { default as MSI, plugin, type MSIInterface, type MSIProps, type MSIRef } from './allend/MSI/native';
3
+ declare const De: {
4
+ MSI: import("react").ForwardRefExoticComponent<import("./allend/MSI/native").MSIProps & import("react").RefAttributes<import("./allend/MSI/native").MSIRef>>;
5
+ Auth: typeof import("./core").Auth;
6
+ OTPAuth: typeof import("./core").OTPAuth;
7
+ Pipelines: typeof import("./core").Pipelines;
8
+ Realtime: typeof import("./core").Realtime;
9
+ IoT: typeof import("./allend/IoTSP/backend").default;
10
+ LSP: typeof import("./core").LSP;
11
+ CSP: typeof import("./core").CSP;
12
+ DEV: typeof import("./core").DEV;
13
+ IoTSP: typeof import("./core").IoTSP;
14
+ Workspace: typeof import("./core").Workspace;
15
+ Workflows: typeof import("./core").Workflows;
16
+ Tracking: typeof import("./core").Tracking;
17
+ Utils: {
18
+ Stream: typeof import("./utils/stream").default;
19
+ };
20
+ DClient: {
21
+ Client: typeof import("./allend/Workflows/Client").default;
22
+ Event: typeof import("./core").Realtime;
23
+ };
24
+ IoTClient: typeof import("./core").IoTClient;
25
+ Customer: typeof import("./core").Customer;
26
+ Agent: typeof import("./core").Agent;
27
+ Queries: typeof import("./core").Queries;
28
+ Utilities: typeof import("./core").Utilities;
29
+ };
30
+ export default De;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ // ─── @de./sdk/react-native — React Native entry point ─────────────────────────
3
+ //
4
+ // The platform-neutral core plus the native MSI gateway (WebView + webview.io).
5
+ //
6
+ // Everything outside the gateway is the same code the web entry uses -- the MSI
7
+ // control surface (Controls, Handles, Plugins) is written against a transport
8
+ // contract both iframe.io and webview.io satisfy, so there is no native copy of
9
+ // it to drift.
10
+ //
11
+ // import De, { MSI } from '@de./sdk/react-native'
12
+ //
13
+ // <MSI
14
+ // env="dev"
15
+ // getAccessToken={() => token}
16
+ // onLoaded={({ controls, handles }) => …}
17
+ // />
18
+ //
19
+ // Requires react, react-native and react-native-webview in the host app; they
20
+ // are declared as optional peer dependencies so web and server installs are not
21
+ // asked for them.
22
+ //
23
+ // ─────────────────────────────────────────────────────────────────────────────
24
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ var desc = Object.getOwnPropertyDescriptor(m, k);
27
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
28
+ desc = { enumerable: true, get: function() { return m[k]; } };
29
+ }
30
+ Object.defineProperty(o, k2, desc);
31
+ }) : (function(o, m, k, k2) {
32
+ if (k2 === undefined) k2 = k;
33
+ o[k2] = m[k];
34
+ }));
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.plugin = exports.MSI = void 0;
43
+ __exportStar(require("./core"), exports);
44
+ // Map Service Interface (de.eui service) — WebView gateway
45
+ var native_1 = require("./allend/MSI/native");
46
+ Object.defineProperty(exports, "MSI", { enumerable: true, get: function () { return __importDefault(native_1).default; } });
47
+ Object.defineProperty(exports, "plugin", { enumerable: true, get: function () { return native_1.plugin; } });
48
+ const native_2 = __importDefault(require("./allend/MSI/native"));
49
+ const core_1 = require("./core");
50
+ const De = {
51
+ ...core_1.core,
52
+ MSI: native_2.default
53
+ };
54
+ exports.default = De;
55
+ //# sourceMappingURL=react-native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native.js","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,eAAe;AACf,EAAE;AACF,oDAAoD;AACpD,EAAE;AACF,SAAS;AACT,gBAAgB;AAChB,mCAAmC;AACnC,8CAA8C;AAC9C,OAAO;AACP,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,kBAAkB;AAClB,EAAE;AACF,gFAAgF;;;;;;;;;;;;;;;;;;;;AAEhF,yCAAsB;AAEtB,2DAA2D;AAC3D,8CAM4B;AAL3B,8GAAA,OAAO,OAAO;AACd,gGAAA,MAAM,OAAA;AAMP,iEAAqC;AACrC,iCAA6B;AAE7B,MAAM,EAAE,GAAG;IACV,GAAG,WAAI;IACP,GAAG,EAAH,gBAAG;CACH,CAAA;AAED,kBAAe,EAAE,CAAA"}
@@ -1,8 +1,65 @@
1
+ /**
2
+ * End-user session credentials.
3
+ *
4
+ * Issued by de.auth when a person signs in (`ctoken` + `deviceId`) and sent
5
+ * as the `de-auth-token` / `de-auth-device` header pair.
6
+ */
7
+ export type UserSession = {
8
+ /** Connection token from de.auth — the `ctoken` field. */
9
+ token: string
10
+ /** Device id issued alongside the connection token. */
11
+ device: string
12
+ }
13
+
1
14
  export type AccessOptions = {
2
- env: 'dev' | 'prod'
3
- platform: 'web' | 'mobile' | 'server' | 'proxy'
4
- version?: number
5
- context: string
6
- accessToken: string
7
- remoteOrigin?: string
8
- }
15
+ env: 'dev' | 'staging' | 'prod'
16
+ platform: 'web' | 'mobile' | 'server' | 'proxy'
17
+ version?: number
18
+ context: string
19
+ accessToken: string
20
+ remoteOrigin?: string
21
+ /**
22
+ * Host to substitute for `localhost` when `env` is `dev`.
23
+ *
24
+ * Native apps cannot reach the host machine on localhost -- the Android
25
+ * emulator maps it to 10.0.2.2 and a physical device needs the LAN address.
26
+ * Ignored outside `dev`.
27
+ */
28
+ devHostname?: string
29
+ /**
30
+ * Signed-in user, when the client acts on someone's behalf.
31
+ *
32
+ * Some de.arch routes authenticate the *caller* rather than the
33
+ * integration: AUX agent routes run `isConnected`, which reads
34
+ * `de-auth-token` / `de-auth-device` and never inspects the bearer token.
35
+ * A client that sends only `authorization` cannot reach them.
36
+ *
37
+ * Supply this when acting as a signed-in user — a rider in a driver app, a
38
+ * customer in a consumer app. The bearer token is still sent, since it
39
+ * identifies the integration; the two credentials travel together.
40
+ */
41
+ session?: UserSession
42
+ /**
43
+ * Deadline for every request this client makes, in milliseconds.
44
+ *
45
+ * Without one a request has no upper bound. Node closes idle keep-alive
46
+ * connections after 5s while the client pool hands one out regardless, so a
47
+ * request can be written into a socket the server already closed and then
48
+ * wait forever — a hang in the caller, not an error it can handle.
49
+ *
50
+ * Omit it to keep the runtime's own default (none, in practice).
51
+ */
52
+ timeout?: number
53
+ /**
54
+ * Explicit service origin, overriding the environment table.
55
+ *
56
+ * The table maps `dev` to fixed localhost ports, which only holds when
57
+ * every service runs on the port it was assigned. A self-hosted De., or a
58
+ * dev machine running de.workspace on its own port, has no entry there —
59
+ * and no host substitution can invent one, since `devHostname` swaps the
60
+ * host and keeps the port.
61
+ *
62
+ * Give an origin (`http://localhost:22200`), not a path.
63
+ */
64
+ baseUrl?: string
65
+ }
@@ -1,27 +1,27 @@
1
1
  export type AuthOptions = {
2
- env: 'dev' | 'prod'
3
- version?: number
4
- autorefresh?: boolean
5
- onNewToken?: (token: string) => void
2
+ env: 'dev' | 'staging' | 'prod'
3
+ version?: number
4
+ autorefresh?: boolean
5
+ onNewToken?: ( token: string ) => void
6
6
  }
7
7
 
8
8
  export type AuthCredentials = {
9
- context: string
10
- remoteOrigin: string
11
- cid: string
12
- secret: string
9
+ context: string
10
+ remoteOrigin: string
11
+ cid: string
12
+ secret: string
13
13
  }
14
14
 
15
15
  export type SocketAuthCredentials = {
16
- utype: string
17
- id: string
18
- remoteOrigin: string
19
- accessToken: string
16
+ utype: string
17
+ id: string
18
+ remoteOrigin: string
19
+ accessToken: string
20
20
  }
21
21
 
22
22
  export type AuthRequestOptions = {
23
- url: string
24
- method: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'
25
- headers?: { [index: string]: string }
26
- body?: any
27
- }
23
+ url: string
24
+ method: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'
25
+ headers?: { [index: string]: string }
26
+ body?: any
27
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Transport-agnostic message channel.
3
+ *
4
+ * The MSI control surface (Controls, Handles, Plugins) talks to the gateway
5
+ * exclusively through this contract, so the same logic drives a browser iframe
6
+ * and a React Native WebView without a per-platform copy.
7
+ *
8
+ * Both transports satisfy it structurally, with no adapter: `iframe.io` (IOF)
9
+ * and `webview.io` (WIO) declare identical `Listener` / `AckFunction` types and
10
+ * identical signatures for every method below. They diverge only at connection
11
+ * setup -- `initiate()` takes a `Window` on web and a `WebView` ref on native,
12
+ * and WIO adds `handleMessage()` / `getInjectedJavaScript()`. Those live in the
13
+ * platform entry points, which hold the concrete transport type and so keep
14
+ * full access to it; deliberately none of them appear here.
15
+ */
16
+
17
+ export type AckFunction = ( error: boolean | string, ...args: any[] ) => void
18
+ export type Listener = ( payload?: any, ack?: AckFunction ) => void
19
+
20
+ export interface Channel {
21
+ /**
22
+ * Send an event to the peer, optionally with an acknowledgement callback.
23
+ */
24
+ emit<T = any>( _event: string, payload?: T | AckFunction, fn?: AckFunction ): Channel
25
+
26
+ /**
27
+ * Subscribe to an event from the peer.
28
+ */
29
+ on( _event: string, fn: Listener ): Channel
30
+
31
+ /**
32
+ * Subscribe to the next occurrence of an event only.
33
+ */
34
+ once( _event: string, fn: Listener ): Channel
35
+
36
+ /**
37
+ * Unsubscribe a listener, or every listener for the event when none is given.
38
+ */
39
+ off( _event: string, fn?: Listener ): Channel
40
+
41
+ /**
42
+ * Remove all registered listeners.
43
+ */
44
+ removeListeners( fn?: Listener ): Channel
45
+ }