eat518 1.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 (469) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +201 -0
  3. package/README.md +391 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +180 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +180 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +461 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +457 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +35 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +32 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +85 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +79 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/sleep.d.mts +2 -0
  199. package/internal/utils/sleep.d.mts.map +1 -0
  200. package/internal/utils/sleep.d.ts +2 -0
  201. package/internal/utils/sleep.d.ts.map +1 -0
  202. package/internal/utils/sleep.js +7 -0
  203. package/internal/utils/sleep.js.map +1 -0
  204. package/internal/utils/sleep.mjs +3 -0
  205. package/internal/utils/sleep.mjs.map +1 -0
  206. package/internal/utils/uuid.d.mts +5 -0
  207. package/internal/utils/uuid.d.mts.map +1 -0
  208. package/internal/utils/uuid.d.ts +5 -0
  209. package/internal/utils/uuid.d.ts.map +1 -0
  210. package/internal/utils/uuid.js +19 -0
  211. package/internal/utils/uuid.js.map +1 -0
  212. package/internal/utils/uuid.mjs +15 -0
  213. package/internal/utils/uuid.mjs.map +1 -0
  214. package/internal/utils/values.d.mts +18 -0
  215. package/internal/utils/values.d.mts.map +1 -0
  216. package/internal/utils/values.d.ts +18 -0
  217. package/internal/utils/values.d.ts.map +1 -0
  218. package/internal/utils/values.js +112 -0
  219. package/internal/utils/values.js.map +1 -0
  220. package/internal/utils/values.mjs +94 -0
  221. package/internal/utils/values.mjs.map +1 -0
  222. package/internal/utils.d.mts +7 -0
  223. package/internal/utils.d.mts.map +1 -0
  224. package/internal/utils.d.ts +7 -0
  225. package/internal/utils.d.ts.map +1 -0
  226. package/internal/utils.js +11 -0
  227. package/internal/utils.js.map +1 -0
  228. package/internal/utils.mjs +8 -0
  229. package/internal/utils.mjs.map +1 -0
  230. package/package.json +138 -0
  231. package/resource.d.mts +2 -0
  232. package/resource.d.mts.map +1 -0
  233. package/resource.d.ts +2 -0
  234. package/resource.d.ts.map +1 -0
  235. package/resource.js +6 -0
  236. package/resource.js.map +1 -0
  237. package/resource.mjs +2 -0
  238. package/resource.mjs.map +1 -0
  239. package/resources/customer/businesses.d.mts +260 -0
  240. package/resources/customer/businesses.d.mts.map +1 -0
  241. package/resources/customer/businesses.d.ts +260 -0
  242. package/resources/customer/businesses.d.ts.map +1 -0
  243. package/resources/customer/businesses.js +77 -0
  244. package/resources/customer/businesses.js.map +1 -0
  245. package/resources/customer/businesses.mjs +73 -0
  246. package/resources/customer/businesses.mjs.map +1 -0
  247. package/resources/customer/channels.d.mts +34 -0
  248. package/resources/customer/channels.d.mts.map +1 -0
  249. package/resources/customer/channels.d.ts +34 -0
  250. package/resources/customer/channels.d.ts.map +1 -0
  251. package/resources/customer/channels.js +25 -0
  252. package/resources/customer/channels.js.map +1 -0
  253. package/resources/customer/channels.mjs +21 -0
  254. package/resources/customer/channels.mjs.map +1 -0
  255. package/resources/customer/customer.d.mts +151 -0
  256. package/resources/customer/customer.d.mts.map +1 -0
  257. package/resources/customer/customer.d.ts +151 -0
  258. package/resources/customer/customer.d.ts.map +1 -0
  259. package/resources/customer/customer.js +104 -0
  260. package/resources/customer/customer.js.map +1 -0
  261. package/resources/customer/customer.mjs +99 -0
  262. package/resources/customer/customer.mjs.map +1 -0
  263. package/resources/customer/discovery/category.d.mts +84 -0
  264. package/resources/customer/discovery/category.d.mts.map +1 -0
  265. package/resources/customer/discovery/category.d.ts +84 -0
  266. package/resources/customer/discovery/category.d.ts.map +1 -0
  267. package/resources/customer/discovery/category.js +25 -0
  268. package/resources/customer/discovery/category.js.map +1 -0
  269. package/resources/customer/discovery/category.mjs +21 -0
  270. package/resources/customer/discovery/category.mjs.map +1 -0
  271. package/resources/customer/discovery/discovery.d.mts +34 -0
  272. package/resources/customer/discovery/discovery.d.mts.map +1 -0
  273. package/resources/customer/discovery/discovery.d.ts +34 -0
  274. package/resources/customer/discovery/discovery.d.ts.map +1 -0
  275. package/resources/customer/discovery/discovery.js +30 -0
  276. package/resources/customer/discovery/discovery.js.map +1 -0
  277. package/resources/customer/discovery/discovery.mjs +25 -0
  278. package/resources/customer/discovery/discovery.mjs.map +1 -0
  279. package/resources/customer/discovery/index.d.mts +3 -0
  280. package/resources/customer/discovery/index.d.mts.map +1 -0
  281. package/resources/customer/discovery/index.d.ts +3 -0
  282. package/resources/customer/discovery/index.d.ts.map +1 -0
  283. package/resources/customer/discovery/index.js +9 -0
  284. package/resources/customer/discovery/index.js.map +1 -0
  285. package/resources/customer/discovery/index.mjs +4 -0
  286. package/resources/customer/discovery/index.mjs.map +1 -0
  287. package/resources/customer/discovery.d.mts +2 -0
  288. package/resources/customer/discovery.d.mts.map +1 -0
  289. package/resources/customer/discovery.d.ts +2 -0
  290. package/resources/customer/discovery.d.ts.map +1 -0
  291. package/resources/customer/discovery.js +6 -0
  292. package/resources/customer/discovery.js.map +1 -0
  293. package/resources/customer/discovery.mjs +3 -0
  294. package/resources/customer/discovery.mjs.map +1 -0
  295. package/resources/customer/explore.d.mts +59 -0
  296. package/resources/customer/explore.d.mts.map +1 -0
  297. package/resources/customer/explore.d.ts +59 -0
  298. package/resources/customer/explore.d.ts.map +1 -0
  299. package/resources/customer/explore.js +24 -0
  300. package/resources/customer/explore.js.map +1 -0
  301. package/resources/customer/explore.mjs +20 -0
  302. package/resources/customer/explore.mjs.map +1 -0
  303. package/resources/customer/index.d.mts +8 -0
  304. package/resources/customer/index.d.mts.map +1 -0
  305. package/resources/customer/index.d.ts +8 -0
  306. package/resources/customer/index.d.ts.map +1 -0
  307. package/resources/customer/index.js +19 -0
  308. package/resources/customer/index.js.map +1 -0
  309. package/resources/customer/index.mjs +9 -0
  310. package/resources/customer/index.mjs.map +1 -0
  311. package/resources/customer/messaging/conversations/conversations.d.mts +106 -0
  312. package/resources/customer/messaging/conversations/conversations.d.mts.map +1 -0
  313. package/resources/customer/messaging/conversations/conversations.d.ts +106 -0
  314. package/resources/customer/messaging/conversations/conversations.d.ts.map +1 -0
  315. package/resources/customer/messaging/conversations/conversations.js +77 -0
  316. package/resources/customer/messaging/conversations/conversations.js.map +1 -0
  317. package/resources/customer/messaging/conversations/conversations.mjs +72 -0
  318. package/resources/customer/messaging/conversations/conversations.mjs.map +1 -0
  319. package/resources/customer/messaging/conversations/index.d.mts +3 -0
  320. package/resources/customer/messaging/conversations/index.d.mts.map +1 -0
  321. package/resources/customer/messaging/conversations/index.d.ts +3 -0
  322. package/resources/customer/messaging/conversations/index.d.ts.map +1 -0
  323. package/resources/customer/messaging/conversations/index.js +9 -0
  324. package/resources/customer/messaging/conversations/index.js.map +1 -0
  325. package/resources/customer/messaging/conversations/index.mjs +4 -0
  326. package/resources/customer/messaging/conversations/index.mjs.map +1 -0
  327. package/resources/customer/messaging/conversations/messages.d.mts +117 -0
  328. package/resources/customer/messaging/conversations/messages.d.mts.map +1 -0
  329. package/resources/customer/messaging/conversations/messages.d.ts +117 -0
  330. package/resources/customer/messaging/conversations/messages.d.ts.map +1 -0
  331. package/resources/customer/messaging/conversations/messages.js +79 -0
  332. package/resources/customer/messaging/conversations/messages.js.map +1 -0
  333. package/resources/customer/messaging/conversations/messages.mjs +75 -0
  334. package/resources/customer/messaging/conversations/messages.mjs.map +1 -0
  335. package/resources/customer/messaging/conversations.d.mts +2 -0
  336. package/resources/customer/messaging/conversations.d.mts.map +1 -0
  337. package/resources/customer/messaging/conversations.d.ts +2 -0
  338. package/resources/customer/messaging/conversations.d.ts.map +1 -0
  339. package/resources/customer/messaging/conversations.js +6 -0
  340. package/resources/customer/messaging/conversations.js.map +1 -0
  341. package/resources/customer/messaging/conversations.mjs +3 -0
  342. package/resources/customer/messaging/conversations.mjs.map +1 -0
  343. package/resources/customer/messaging/index.d.mts +3 -0
  344. package/resources/customer/messaging/index.d.mts.map +1 -0
  345. package/resources/customer/messaging/index.d.ts +3 -0
  346. package/resources/customer/messaging/index.d.ts.map +1 -0
  347. package/resources/customer/messaging/index.js +9 -0
  348. package/resources/customer/messaging/index.js.map +1 -0
  349. package/resources/customer/messaging/index.mjs +4 -0
  350. package/resources/customer/messaging/index.mjs.map +1 -0
  351. package/resources/customer/messaging/messaging.d.mts +10 -0
  352. package/resources/customer/messaging/messaging.d.mts.map +1 -0
  353. package/resources/customer/messaging/messaging.d.ts +10 -0
  354. package/resources/customer/messaging/messaging.d.ts.map +1 -0
  355. package/resources/customer/messaging/messaging.js +17 -0
  356. package/resources/customer/messaging/messaging.js.map +1 -0
  357. package/resources/customer/messaging/messaging.mjs +12 -0
  358. package/resources/customer/messaging/messaging.mjs.map +1 -0
  359. package/resources/customer/messaging.d.mts +2 -0
  360. package/resources/customer/messaging.d.mts.map +1 -0
  361. package/resources/customer/messaging.d.ts +2 -0
  362. package/resources/customer/messaging.d.ts.map +1 -0
  363. package/resources/customer/messaging.js +6 -0
  364. package/resources/customer/messaging.js.map +1 -0
  365. package/resources/customer/messaging.mjs +3 -0
  366. package/resources/customer/messaging.mjs.map +1 -0
  367. package/resources/customer/tokens.d.mts +43 -0
  368. package/resources/customer/tokens.d.mts.map +1 -0
  369. package/resources/customer/tokens.d.ts +43 -0
  370. package/resources/customer/tokens.d.ts.map +1 -0
  371. package/resources/customer/tokens.js +34 -0
  372. package/resources/customer/tokens.js.map +1 -0
  373. package/resources/customer/tokens.mjs +30 -0
  374. package/resources/customer/tokens.mjs.map +1 -0
  375. package/resources/customer.d.mts +2 -0
  376. package/resources/customer.d.mts.map +1 -0
  377. package/resources/customer.d.ts +2 -0
  378. package/resources/customer.d.ts.map +1 -0
  379. package/resources/customer.js +6 -0
  380. package/resources/customer.js.map +1 -0
  381. package/resources/customer.mjs +3 -0
  382. package/resources/customer.mjs.map +1 -0
  383. package/resources/index.d.mts +2 -0
  384. package/resources/index.d.mts.map +1 -0
  385. package/resources/index.d.ts +2 -0
  386. package/resources/index.d.ts.map +1 -0
  387. package/resources/index.js +7 -0
  388. package/resources/index.js.map +1 -0
  389. package/resources/index.mjs +3 -0
  390. package/resources/index.mjs.map +1 -0
  391. package/resources.d.mts +2 -0
  392. package/resources.d.mts.map +1 -0
  393. package/resources.d.ts +2 -0
  394. package/resources.d.ts.map +1 -0
  395. package/resources.js +5 -0
  396. package/resources.js.map +1 -0
  397. package/resources.mjs +2 -0
  398. package/resources.mjs.map +1 -0
  399. package/src/api-promise.ts +2 -0
  400. package/src/client.ts +748 -0
  401. package/src/core/README.md +3 -0
  402. package/src/core/api-promise.ts +92 -0
  403. package/src/core/error.ts +130 -0
  404. package/src/core/resource.ts +11 -0
  405. package/src/core/uploads.ts +2 -0
  406. package/src/error.ts +2 -0
  407. package/src/index.ts +22 -0
  408. package/src/internal/README.md +3 -0
  409. package/src/internal/builtin-types.ts +93 -0
  410. package/src/internal/detect-platform.ts +196 -0
  411. package/src/internal/errors.ts +33 -0
  412. package/src/internal/headers.ts +97 -0
  413. package/src/internal/parse.ts +50 -0
  414. package/src/internal/request-options.ts +91 -0
  415. package/src/internal/shim-types.ts +26 -0
  416. package/src/internal/shims.ts +107 -0
  417. package/src/internal/to-file.ts +154 -0
  418. package/src/internal/types.ts +95 -0
  419. package/src/internal/uploads.ts +187 -0
  420. package/src/internal/utils/base64.ts +40 -0
  421. package/src/internal/utils/bytes.ts +32 -0
  422. package/src/internal/utils/env.ts +18 -0
  423. package/src/internal/utils/log.ts +126 -0
  424. package/src/internal/utils/path.ts +88 -0
  425. package/src/internal/utils/sleep.ts +3 -0
  426. package/src/internal/utils/uuid.ts +17 -0
  427. package/src/internal/utils/values.ts +105 -0
  428. package/src/internal/utils.ts +8 -0
  429. package/src/lib/.keep +4 -0
  430. package/src/resource.ts +2 -0
  431. package/src/resources/customer/businesses.ts +397 -0
  432. package/src/resources/customer/channels.ts +45 -0
  433. package/src/resources/customer/customer.ts +249 -0
  434. package/src/resources/customer/discovery/category.ts +127 -0
  435. package/src/resources/customer/discovery/discovery.ts +51 -0
  436. package/src/resources/customer/discovery/index.ts +4 -0
  437. package/src/resources/customer/discovery.ts +3 -0
  438. package/src/resources/customer/explore.ts +87 -0
  439. package/src/resources/customer/index.ts +33 -0
  440. package/src/resources/customer/messaging/conversations/conversations.ts +173 -0
  441. package/src/resources/customer/messaging/conversations/index.ts +21 -0
  442. package/src/resources/customer/messaging/conversations/messages.ts +184 -0
  443. package/src/resources/customer/messaging/conversations.ts +3 -0
  444. package/src/resources/customer/messaging/index.ts +12 -0
  445. package/src/resources/customer/messaging/messaging.ts +31 -0
  446. package/src/resources/customer/messaging.ts +3 -0
  447. package/src/resources/customer/tokens.ts +58 -0
  448. package/src/resources/customer.ts +3 -0
  449. package/src/resources/index.ts +14 -0
  450. package/src/resources.ts +1 -0
  451. package/src/tsconfig.json +11 -0
  452. package/src/uploads.ts +2 -0
  453. package/src/version.ts +1 -0
  454. package/uploads.d.mts +2 -0
  455. package/uploads.d.mts.map +1 -0
  456. package/uploads.d.ts +2 -0
  457. package/uploads.d.ts.map +1 -0
  458. package/uploads.js +6 -0
  459. package/uploads.js.map +1 -0
  460. package/uploads.mjs +2 -0
  461. package/uploads.mjs.map +1 -0
  462. package/version.d.mts +2 -0
  463. package/version.d.mts.map +1 -0
  464. package/version.d.ts +2 -0
  465. package/version.d.ts.map +1 -0
  466. package/version.js +5 -0
  467. package/version.js.map +1 -0
  468. package/version.mjs +2 -0
  469. package/version.mjs.map +1 -0
@@ -0,0 +1,397 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as BusinessesAPI from './businesses';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Businesses extends APIResource {
10
+ /**
11
+ * Retrieve business announcements and updates with pagination.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const response =
16
+ * await client.customer.businesses.getBulletins(
17
+ * 'katzs-deli',
18
+ * );
19
+ * ```
20
+ */
21
+ getBulletins(
22
+ handle: string,
23
+ query: BusinessGetBulletinsParams | null | undefined = {},
24
+ options?: RequestOptions,
25
+ ): APIPromise<BusinessGetBulletinsResponse> {
26
+ return this._client.get(path`/customer/businesses/${handle}/bulletins`, { query, ...options });
27
+ }
28
+
29
+ /**
30
+ * Retrieve upcoming events for the business with pagination.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const response = await client.customer.businesses.getEvents(
35
+ * 'katzs-deli',
36
+ * );
37
+ * ```
38
+ */
39
+ getEvents(
40
+ handle: string,
41
+ query: BusinessGetEventsParams | null | undefined = {},
42
+ options?: RequestOptions,
43
+ ): APIPromise<BusinessGetEventsResponse> {
44
+ return this._client.get(path`/customer/businesses/${handle}/events`, { query, ...options });
45
+ }
46
+
47
+ /**
48
+ * Retrieve all menus organized by groups for the business.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const response = await client.customer.businesses.getMenus(
53
+ * 'katzs-deli',
54
+ * );
55
+ * ```
56
+ */
57
+ getMenus(
58
+ handle: string,
59
+ query: BusinessGetMenusParams | null | undefined = {},
60
+ options?: RequestOptions,
61
+ ): APIPromise<BusinessGetMenusResponse> {
62
+ return this._client.get(path`/customer/businesses/${handle}/menus`, { query, ...options });
63
+ }
64
+
65
+ /**
66
+ * Retrieve photo gallery for the business with pagination.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.customer.businesses.getPhotos(
71
+ * 'katzs-deli',
72
+ * );
73
+ * ```
74
+ */
75
+ getPhotos(
76
+ handle: string,
77
+ query: BusinessGetPhotosParams | null | undefined = {},
78
+ options?: RequestOptions,
79
+ ): APIPromise<BusinessGetPhotosResponse> {
80
+ return this._client.get(path`/customer/businesses/${handle}/photos`, { query, ...options });
81
+ }
82
+
83
+ /**
84
+ * Retrieve core business information for the profile page.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const response =
89
+ * await client.customer.businesses.retrieveProfile(
90
+ * 'katzs-deli',
91
+ * );
92
+ * ```
93
+ */
94
+ retrieveProfile(handle: string, options?: RequestOptions): APIPromise<BusinessRetrieveProfileResponse> {
95
+ return this._client.get(path`/customer/businesses/${handle}`, options);
96
+ }
97
+ }
98
+
99
+ export interface Image {
100
+ id: string;
101
+
102
+ alt_text: string | null;
103
+
104
+ created_at: string | null;
105
+
106
+ disk: string;
107
+
108
+ filename: string;
109
+
110
+ imageable_id: string;
111
+
112
+ imageable_type: string;
113
+
114
+ mime_type: string | null;
115
+
116
+ original_filename: string;
117
+
118
+ path: string;
119
+
120
+ size: number | null;
121
+
122
+ sort_order: number;
123
+
124
+ updated_at: string | null;
125
+
126
+ url: string;
127
+ }
128
+
129
+ export interface Pagination {
130
+ current_page: string;
131
+
132
+ has_more: string;
133
+
134
+ per_page: string;
135
+
136
+ total: string;
137
+ }
138
+
139
+ export interface BusinessGetBulletinsResponse {
140
+ data: BusinessGetBulletinsResponse.Data;
141
+ }
142
+
143
+ export namespace BusinessGetBulletinsResponse {
144
+ export interface Data {
145
+ bulletins: Array<Data.Bulletin>;
146
+
147
+ pagination: BusinessesAPI.Pagination;
148
+ }
149
+
150
+ export namespace Data {
151
+ export interface Bulletin {
152
+ id: string;
153
+
154
+ content: string;
155
+
156
+ published_at: string | null;
157
+
158
+ title: string;
159
+ }
160
+ }
161
+ }
162
+
163
+ export interface BusinessGetEventsResponse {
164
+ data: BusinessGetEventsResponse.Data;
165
+ }
166
+
167
+ export namespace BusinessGetEventsResponse {
168
+ export interface Data {
169
+ events: Array<Data.Event>;
170
+
171
+ pagination: BusinessesAPI.Pagination;
172
+ }
173
+
174
+ export namespace Data {
175
+ export interface Event {
176
+ id: string;
177
+
178
+ description: string | null;
179
+
180
+ ends_at: string;
181
+
182
+ image: BusinessesAPI.Image;
183
+
184
+ starts_at: string;
185
+
186
+ title: string;
187
+ }
188
+ }
189
+ }
190
+
191
+ export interface BusinessGetMenusResponse {
192
+ data: BusinessGetMenusResponse.Data;
193
+ }
194
+
195
+ export namespace BusinessGetMenusResponse {
196
+ export interface Data {
197
+ menus: Array<Data.Menu>;
198
+
199
+ pagination: BusinessesAPI.Pagination;
200
+ }
201
+
202
+ export namespace Data {
203
+ export interface Menu {
204
+ id: string;
205
+
206
+ description: string | null;
207
+
208
+ groups: Array<Menu.Group>;
209
+
210
+ name: string;
211
+ }
212
+
213
+ export namespace Menu {
214
+ export interface Group {
215
+ id: string;
216
+
217
+ description: string | null;
218
+
219
+ items: Array<Group.Item>;
220
+
221
+ name: string;
222
+ }
223
+
224
+ export namespace Group {
225
+ export interface Item {
226
+ id: string;
227
+
228
+ allergens: Array<Item.Allergen>;
229
+
230
+ description: string | null;
231
+
232
+ image: BusinessesAPI.Image;
233
+
234
+ name: string;
235
+
236
+ price: string | null;
237
+ }
238
+
239
+ export namespace Item {
240
+ export interface Allergen {
241
+ id: string;
242
+
243
+ color: string;
244
+
245
+ created_at: string | null;
246
+
247
+ description: string | null;
248
+
249
+ icon: string | null;
250
+
251
+ name: string;
252
+
253
+ slug: string;
254
+
255
+ updated_at: string | null;
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ export interface BusinessGetPhotosResponse {
264
+ data: BusinessGetPhotosResponse.Data;
265
+ }
266
+
267
+ export namespace BusinessGetPhotosResponse {
268
+ export interface Data {
269
+ pagination: BusinessesAPI.Pagination;
270
+
271
+ photos: Array<Data.Photo>;
272
+ }
273
+
274
+ export namespace Data {
275
+ export interface Photo {
276
+ id: string;
277
+
278
+ alt_text: string;
279
+
280
+ url: string;
281
+ }
282
+ }
283
+ }
284
+
285
+ export interface BusinessRetrieveProfileResponse {
286
+ data: BusinessRetrieveProfileResponse.Data;
287
+ }
288
+
289
+ export namespace BusinessRetrieveProfileResponse {
290
+ export interface Data {
291
+ id: string;
292
+
293
+ address: string;
294
+
295
+ category: string;
296
+
297
+ city: string;
298
+
299
+ cover_photo: string;
300
+
301
+ description: string;
302
+
303
+ handle: string;
304
+
305
+ hours: { [key: string]: Data.Hours };
306
+
307
+ latitude: number;
308
+
309
+ logo: string;
310
+
311
+ longitude: number;
312
+
313
+ name: string;
314
+
315
+ phone: string;
316
+
317
+ state: string;
318
+
319
+ website: string;
320
+
321
+ zip: string;
322
+ }
323
+
324
+ export namespace Data {
325
+ export interface Hours {
326
+ closeTime: string;
327
+
328
+ isOpen: boolean;
329
+
330
+ openTime: string;
331
+ }
332
+ }
333
+ }
334
+
335
+ export interface BusinessGetBulletinsParams {
336
+ /**
337
+ * Page number for pagination
338
+ */
339
+ page?: number;
340
+
341
+ /**
342
+ * Number of bulletins per page
343
+ */
344
+ per_page?: number;
345
+ }
346
+
347
+ export interface BusinessGetEventsParams {
348
+ /**
349
+ * Page number for pagination
350
+ */
351
+ page?: number;
352
+
353
+ /**
354
+ * Number of events per page
355
+ */
356
+ per_page?: number;
357
+ }
358
+
359
+ export interface BusinessGetMenusParams {
360
+ /**
361
+ * Page number for pagination
362
+ */
363
+ page?: number;
364
+
365
+ /**
366
+ * Number of items per page
367
+ */
368
+ per_page?: number;
369
+ }
370
+
371
+ export interface BusinessGetPhotosParams {
372
+ /**
373
+ * Page number for pagination
374
+ */
375
+ page?: number;
376
+
377
+ /**
378
+ * Number of photos per page
379
+ */
380
+ per_page?: number;
381
+ }
382
+
383
+ export declare namespace Businesses {
384
+ export {
385
+ type Image as Image,
386
+ type Pagination as Pagination,
387
+ type BusinessGetBulletinsResponse as BusinessGetBulletinsResponse,
388
+ type BusinessGetEventsResponse as BusinessGetEventsResponse,
389
+ type BusinessGetMenusResponse as BusinessGetMenusResponse,
390
+ type BusinessGetPhotosResponse as BusinessGetPhotosResponse,
391
+ type BusinessRetrieveProfileResponse as BusinessRetrieveProfileResponse,
392
+ type BusinessGetBulletinsParams as BusinessGetBulletinsParams,
393
+ type BusinessGetEventsParams as BusinessGetEventsParams,
394
+ type BusinessGetMenusParams as BusinessGetMenusParams,
395
+ type BusinessGetPhotosParams as BusinessGetPhotosParams,
396
+ };
397
+ }
@@ -0,0 +1,45 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+
7
+ export class Channels extends APIResource {
8
+ /**
9
+ * This endpoint is used by the mobile app to authenticate with Pusher channels. It
10
+ * validates that the user has permission to access the requested channel.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const response =
15
+ * await client.customer.channels.authenticate({
16
+ * channel_name: 'channel_name',
17
+ * socket_id: 'socket_id',
18
+ * });
19
+ * ```
20
+ */
21
+ authenticate(body: ChannelAuthenticateParams, options?: RequestOptions): APIPromise<string> {
22
+ return this._client.post('/customer/channels/auth', { body, ...options });
23
+ }
24
+ }
25
+
26
+ export type ChannelAuthenticateResponse = string;
27
+
28
+ export interface ChannelAuthenticateParams {
29
+ /**
30
+ * string
31
+ */
32
+ channel_name: string;
33
+
34
+ /**
35
+ * string
36
+ */
37
+ socket_id: string;
38
+ }
39
+
40
+ export declare namespace Channels {
41
+ export {
42
+ type ChannelAuthenticateResponse as ChannelAuthenticateResponse,
43
+ type ChannelAuthenticateParams as ChannelAuthenticateParams,
44
+ };
45
+ }
@@ -0,0 +1,249 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as BusinessesAPI from './businesses';
5
+ import {
6
+ BusinessGetBulletinsParams,
7
+ BusinessGetBulletinsResponse,
8
+ BusinessGetEventsParams,
9
+ BusinessGetEventsResponse,
10
+ BusinessGetMenusParams,
11
+ BusinessGetMenusResponse,
12
+ BusinessGetPhotosParams,
13
+ BusinessGetPhotosResponse,
14
+ BusinessRetrieveProfileResponse,
15
+ Businesses,
16
+ Image,
17
+ Pagination,
18
+ } from './businesses';
19
+ import * as ChannelsAPI from './channels';
20
+ import { ChannelAuthenticateParams, ChannelAuthenticateResponse, Channels } from './channels';
21
+ import * as ExploreAPI from './explore';
22
+ import { Explore, ExploreListBusinessesParams, ExploreListBusinessesResponse } from './explore';
23
+ import * as TokensAPI from './tokens';
24
+ import { TokenListResponse, TokenRevokeResponse, Tokens } from './tokens';
25
+ import * as DiscoveryAPI from './discovery/discovery';
26
+ import { Discovery, DiscoveryListCategoriesResponse } from './discovery/discovery';
27
+ import * as MessagingAPI from './messaging/messaging';
28
+ import { Messaging } from './messaging/messaging';
29
+ import { APIPromise } from '../../core/api-promise';
30
+ import { RequestOptions } from '../../internal/request-options';
31
+
32
+ export class Customer extends APIResource {
33
+ tokens: TokensAPI.Tokens = new TokensAPI.Tokens(this._client);
34
+ channels: ChannelsAPI.Channels = new ChannelsAPI.Channels(this._client);
35
+ businesses: BusinessesAPI.Businesses = new BusinessesAPI.Businesses(this._client);
36
+ messaging: MessagingAPI.Messaging = new MessagingAPI.Messaging(this._client);
37
+ explore: ExploreAPI.Explore = new ExploreAPI.Explore(this._client);
38
+ discovery: DiscoveryAPI.Discovery = new DiscoveryAPI.Discovery(this._client);
39
+
40
+ /**
41
+ * Exchange user credentials for an API token that can be used for subsequent
42
+ * authenticated requests.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const response = await client.customer.login({
47
+ * device_name: 'iPhone 15',
48
+ * email: 'user@example.com',
49
+ * password: 'password123',
50
+ * });
51
+ * ```
52
+ */
53
+ login(body: CustomerLoginParams, options?: RequestOptions): APIPromise<CustomerLoginResponse> {
54
+ return this._client.post('/customer/login', { body, ...options });
55
+ }
56
+
57
+ /**
58
+ * Revoke the current API token and log out the user.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const response = await client.customer.logout();
63
+ * ```
64
+ */
65
+ logout(options?: RequestOptions): APIPromise<CustomerLogoutResponse> {
66
+ return this._client.post('/customer/logout', options);
67
+ }
68
+
69
+ /**
70
+ * Revoke all API tokens for the authenticated user.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const response = await client.customer.logoutAll();
75
+ * ```
76
+ */
77
+ logoutAll(options?: RequestOptions): APIPromise<CustomerLogoutAllResponse> {
78
+ return this._client.post('/customer/logout-all', options);
79
+ }
80
+
81
+ /**
82
+ * Create a new customer account and return an API token for immediate
83
+ * authentication.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const response = await client.customer.register({
88
+ * device_name: 'iPhone 15',
89
+ * email: 'john@example.com',
90
+ * name: 'John Doe',
91
+ * password: 'password123',
92
+ * password_confirmation: 'password123',
93
+ * });
94
+ * ```
95
+ */
96
+ register(body: CustomerRegisterParams, options?: RequestOptions): APIPromise<CustomerRegisterResponse> {
97
+ return this._client.post('/customer/register', { body, ...options });
98
+ }
99
+
100
+ /**
101
+ * Retrieve the current authenticated user's profile information.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const response = await client.customer.retrieveUser();
106
+ * ```
107
+ */
108
+ retrieveUser(options?: RequestOptions): APIPromise<CustomerRetrieveUserResponse> {
109
+ return this._client.get('/customer/user', options);
110
+ }
111
+ }
112
+
113
+ export interface LoginResponse {
114
+ token: string;
115
+
116
+ user: User;
117
+ }
118
+
119
+ export interface User {
120
+ id: string;
121
+
122
+ email: string;
123
+
124
+ name: string;
125
+
126
+ role: string;
127
+ }
128
+
129
+ export interface CustomerLoginResponse {
130
+ data: LoginResponse;
131
+ }
132
+
133
+ export interface CustomerLogoutResponse {
134
+ message: 'Successfully logged out';
135
+ }
136
+
137
+ export interface CustomerLogoutAllResponse {
138
+ message: 'All tokens revoked successfully';
139
+ }
140
+
141
+ export interface CustomerRegisterResponse {
142
+ data: LoginResponse;
143
+ }
144
+
145
+ export interface CustomerRetrieveUserResponse {
146
+ data: User;
147
+ }
148
+
149
+ export interface CustomerLoginParams {
150
+ /**
151
+ * A descriptive name for the device
152
+ */
153
+ device_name: string;
154
+
155
+ /**
156
+ * The user's email address
157
+ */
158
+ email: string;
159
+
160
+ /**
161
+ * The user's password
162
+ */
163
+ password: string;
164
+ }
165
+
166
+ export interface CustomerRegisterParams {
167
+ /**
168
+ * A descriptive name for the device
169
+ */
170
+ device_name: string;
171
+
172
+ /**
173
+ * The customer's email address
174
+ */
175
+ email: string;
176
+
177
+ /**
178
+ * The customer's full name
179
+ */
180
+ name: string;
181
+
182
+ /**
183
+ * The customer's password
184
+ */
185
+ password: string;
186
+
187
+ /**
188
+ * Password confirmation
189
+ */
190
+ password_confirmation: string;
191
+ }
192
+
193
+ Customer.Tokens = Tokens;
194
+ Customer.Channels = Channels;
195
+ Customer.Businesses = Businesses;
196
+ Customer.Messaging = Messaging;
197
+ Customer.Explore = Explore;
198
+ Customer.Discovery = Discovery;
199
+
200
+ export declare namespace Customer {
201
+ export {
202
+ type LoginResponse as LoginResponse,
203
+ type User as User,
204
+ type CustomerLoginResponse as CustomerLoginResponse,
205
+ type CustomerLogoutResponse as CustomerLogoutResponse,
206
+ type CustomerLogoutAllResponse as CustomerLogoutAllResponse,
207
+ type CustomerRegisterResponse as CustomerRegisterResponse,
208
+ type CustomerRetrieveUserResponse as CustomerRetrieveUserResponse,
209
+ type CustomerLoginParams as CustomerLoginParams,
210
+ type CustomerRegisterParams as CustomerRegisterParams,
211
+ };
212
+
213
+ export {
214
+ Tokens as Tokens,
215
+ type TokenListResponse as TokenListResponse,
216
+ type TokenRevokeResponse as TokenRevokeResponse,
217
+ };
218
+
219
+ export {
220
+ Channels as Channels,
221
+ type ChannelAuthenticateResponse as ChannelAuthenticateResponse,
222
+ type ChannelAuthenticateParams as ChannelAuthenticateParams,
223
+ };
224
+
225
+ export {
226
+ Businesses as Businesses,
227
+ type Image as Image,
228
+ type Pagination as Pagination,
229
+ type BusinessGetBulletinsResponse as BusinessGetBulletinsResponse,
230
+ type BusinessGetEventsResponse as BusinessGetEventsResponse,
231
+ type BusinessGetMenusResponse as BusinessGetMenusResponse,
232
+ type BusinessGetPhotosResponse as BusinessGetPhotosResponse,
233
+ type BusinessRetrieveProfileResponse as BusinessRetrieveProfileResponse,
234
+ type BusinessGetBulletinsParams as BusinessGetBulletinsParams,
235
+ type BusinessGetEventsParams as BusinessGetEventsParams,
236
+ type BusinessGetMenusParams as BusinessGetMenusParams,
237
+ type BusinessGetPhotosParams as BusinessGetPhotosParams,
238
+ };
239
+
240
+ export { Messaging as Messaging };
241
+
242
+ export {
243
+ Explore as Explore,
244
+ type ExploreListBusinessesResponse as ExploreListBusinessesResponse,
245
+ type ExploreListBusinessesParams as ExploreListBusinessesParams,
246
+ };
247
+
248
+ export { Discovery as Discovery, type DiscoveryListCategoriesResponse as DiscoveryListCategoriesResponse };
249
+ }