@51eat/sdk 0.0.19 → 0.0.21

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 (281) hide show
  1. package/README.md +15 -18
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +6 -0
  4. package/dist/cjs/Client.js +20 -10
  5. package/dist/cjs/api/resources/business/client/Client.d.ts +6 -0
  6. package/dist/cjs/api/resources/business/client/Client.js +14 -4
  7. package/dist/cjs/api/resources/business/resources/gallery/client/Client.d.ts +86 -0
  8. package/dist/cjs/api/resources/business/resources/gallery/client/Client.js +364 -0
  9. package/dist/cjs/api/resources/business/resources/gallery/client/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/business/resources/gallery/client/index.js +17 -0
  11. package/dist/cjs/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.d.ts +10 -0
  12. package/dist/cjs/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.js +3 -0
  13. package/dist/cjs/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.d.ts +21 -0
  14. package/dist/cjs/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.js +3 -0
  15. package/dist/cjs/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.d.ts +11 -0
  16. package/dist/cjs/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.js +3 -0
  17. package/dist/cjs/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.d.ts +11 -0
  18. package/dist/cjs/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.js +3 -0
  19. package/dist/cjs/api/resources/business/resources/gallery/client/requests/index.d.ts +4 -0
  20. package/dist/cjs/api/resources/business/resources/gallery/client/requests/index.js +2 -0
  21. package/dist/cjs/api/resources/business/resources/gallery/exports.d.ts +2 -0
  22. package/dist/cjs/api/resources/business/resources/gallery/exports.js +21 -0
  23. package/dist/cjs/api/resources/business/resources/gallery/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/business/resources/gallery/index.js +18 -0
  25. package/dist/cjs/api/resources/business/resources/gallery/types/DeleteGalleryResponse.d.ts +9 -0
  26. package/dist/cjs/api/resources/business/resources/gallery/types/DeleteGalleryResponse.js +10 -0
  27. package/dist/cjs/api/resources/business/resources/gallery/types/ListGalleryResponse.d.ts +4 -0
  28. package/dist/cjs/api/resources/business/resources/gallery/types/ListGalleryResponse.js +3 -0
  29. package/dist/cjs/api/resources/business/resources/gallery/types/ReorderGalleryResponse.d.ts +9 -0
  30. package/dist/cjs/api/resources/business/resources/gallery/types/ReorderGalleryResponse.js +10 -0
  31. package/dist/cjs/api/resources/business/resources/gallery/types/UpdateGalleryResponse.d.ts +4 -0
  32. package/dist/cjs/api/resources/business/resources/gallery/types/UpdateGalleryResponse.js +3 -0
  33. package/dist/cjs/api/resources/business/resources/gallery/types/UploadGalleryResponse.d.ts +4 -0
  34. package/dist/cjs/api/resources/business/resources/gallery/types/UploadGalleryResponse.js +3 -0
  35. package/dist/cjs/api/resources/business/resources/gallery/types/index.d.ts +5 -0
  36. package/dist/cjs/api/resources/business/resources/gallery/types/index.js +21 -0
  37. package/dist/cjs/api/resources/business/resources/index.d.ts +4 -0
  38. package/dist/cjs/api/resources/business/resources/index.js +5 -1
  39. package/dist/cjs/api/resources/business/resources/messaging/client/Client.d.ts +15 -0
  40. package/dist/cjs/api/resources/business/resources/messaging/client/Client.js +21 -0
  41. package/dist/cjs/api/resources/business/resources/messaging/client/index.d.ts +1 -0
  42. package/dist/cjs/api/resources/business/resources/messaging/client/index.js +2 -0
  43. package/dist/cjs/api/resources/business/resources/messaging/exports.d.ts +3 -0
  44. package/dist/cjs/api/resources/business/resources/messaging/exports.js +22 -0
  45. package/dist/cjs/api/resources/business/resources/messaging/index.d.ts +2 -0
  46. package/dist/cjs/api/resources/business/resources/messaging/index.js +18 -0
  47. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/Client.d.ts +45 -0
  48. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/Client.js +182 -0
  49. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/index.d.ts +1 -0
  50. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/index.js +17 -0
  51. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.d.ts +10 -0
  52. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.js +3 -0
  53. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.d.ts +10 -0
  54. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.js +3 -0
  55. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/index.d.ts +2 -0
  56. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/index.js +2 -0
  57. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/exports.d.ts +2 -0
  58. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/exports.js +21 -0
  59. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/index.d.ts +2 -0
  60. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/index.js +18 -0
  61. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.d.ts +4 -0
  62. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.js +3 -0
  63. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.d.ts +4 -0
  64. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.js +3 -0
  65. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/index.d.ts +2 -0
  66. package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/index.js +18 -0
  67. package/dist/cjs/api/resources/business/resources/messaging/resources/index.d.ts +6 -0
  68. package/dist/cjs/api/resources/business/resources/messaging/resources/index.js +45 -0
  69. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/Client.d.ts +81 -0
  70. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/Client.js +312 -0
  71. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/index.d.ts +1 -0
  72. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/index.js +17 -0
  73. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.d.ts +14 -0
  74. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.js +3 -0
  75. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.d.ts +10 -0
  76. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.js +3 -0
  77. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.d.ts +22 -0
  78. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.js +12 -0
  79. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.d.ts +10 -0
  80. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.js +3 -0
  81. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/index.d.ts +4 -0
  82. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/index.js +5 -0
  83. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/exports.d.ts +2 -0
  84. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/exports.js +21 -0
  85. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/index.d.ts +2 -0
  86. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/index.js +18 -0
  87. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.d.ts +4 -0
  88. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.js +3 -0
  89. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.d.ts +4 -0
  90. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.js +3 -0
  91. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/index.d.ts +2 -0
  92. package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/index.js +18 -0
  93. package/dist/cjs/api/resources/businessMessaging/client/Client.d.ts +32 -0
  94. package/dist/cjs/api/resources/businessMessaging/client/Client.js +118 -0
  95. package/dist/cjs/api/resources/businessMessaging/client/index.d.ts +1 -0
  96. package/dist/cjs/api/resources/businessMessaging/client/index.js +17 -0
  97. package/dist/cjs/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.d.ts +13 -0
  98. package/dist/cjs/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.js +3 -0
  99. package/dist/cjs/api/resources/businessMessaging/client/requests/index.d.ts +1 -0
  100. package/dist/cjs/api/resources/businessMessaging/client/requests/index.js +2 -0
  101. package/dist/cjs/api/resources/businessMessaging/exports.d.ts +2 -0
  102. package/dist/cjs/api/resources/businessMessaging/exports.js +21 -0
  103. package/dist/cjs/api/resources/businessMessaging/index.d.ts +1 -0
  104. package/dist/cjs/api/resources/businessMessaging/index.js +17 -0
  105. package/dist/cjs/api/resources/businessPushNotifications/client/Client.d.ts +47 -0
  106. package/dist/cjs/api/resources/businessPushNotifications/client/Client.js +182 -0
  107. package/dist/cjs/api/resources/businessPushNotifications/client/index.d.ts +1 -0
  108. package/dist/cjs/api/resources/businessPushNotifications/client/index.js +17 -0
  109. package/dist/cjs/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.d.ts +9 -0
  110. package/dist/cjs/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.js +3 -0
  111. package/dist/cjs/api/resources/businessPushNotifications/client/requests/index.d.ts +2 -0
  112. package/dist/cjs/api/resources/businessPushNotifications/client/requests/index.js +5 -0
  113. package/dist/cjs/api/resources/businessPushNotifications/exports.d.ts +2 -0
  114. package/dist/cjs/api/resources/businessPushNotifications/exports.js +21 -0
  115. package/dist/cjs/api/resources/businessPushNotifications/index.d.ts +2 -0
  116. package/dist/cjs/api/resources/businessPushNotifications/index.js +18 -0
  117. package/dist/cjs/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.d.ts +7 -0
  118. package/dist/cjs/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.js +3 -0
  119. package/dist/cjs/api/resources/businessPushNotifications/types/index.d.ts +1 -0
  120. package/dist/cjs/api/resources/businessPushNotifications/types/index.js +17 -0
  121. package/dist/cjs/api/resources/customer/resources/pushNotifications/client/Client.d.ts +2 -2
  122. package/dist/cjs/api/resources/customer/resources/pushNotifications/client/Client.js +1 -1
  123. package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.d.ts +19 -0
  124. package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.js +11 -0
  125. package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/index.d.ts +1 -1
  126. package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/index.js +3 -3
  127. package/dist/cjs/api/resources/index.d.ts +5 -0
  128. package/dist/cjs/api/resources/index.js +6 -1
  129. package/dist/cjs/api/types/BusinessConversation.d.ts +20 -0
  130. package/dist/cjs/api/types/BusinessConversation.js +3 -0
  131. package/dist/cjs/api/types/BusinessMessage.d.ts +20 -0
  132. package/dist/cjs/api/types/BusinessMessage.js +3 -0
  133. package/dist/cjs/api/types/BusinessPhoto.d.ts +9 -0
  134. package/dist/cjs/api/types/BusinessPhoto.js +3 -0
  135. package/dist/cjs/api/types/index.d.ts +3 -0
  136. package/dist/cjs/api/types/index.js +3 -0
  137. package/dist/cjs/version.d.ts +1 -1
  138. package/dist/cjs/version.js +1 -1
  139. package/dist/esm/BaseClient.mjs +2 -2
  140. package/dist/esm/Client.d.mts +6 -0
  141. package/dist/esm/Client.mjs +10 -0
  142. package/dist/esm/api/resources/business/client/Client.d.mts +6 -0
  143. package/dist/esm/api/resources/business/client/Client.mjs +10 -0
  144. package/dist/esm/api/resources/business/resources/gallery/client/Client.d.mts +86 -0
  145. package/dist/esm/api/resources/business/resources/gallery/client/Client.mjs +327 -0
  146. package/dist/esm/api/resources/business/resources/gallery/client/index.d.mts +1 -0
  147. package/dist/esm/api/resources/business/resources/gallery/client/index.mjs +1 -0
  148. package/dist/esm/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.d.mts +10 -0
  149. package/dist/esm/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.mjs +2 -0
  150. package/dist/esm/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.d.mts +21 -0
  151. package/dist/esm/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.mjs +2 -0
  152. package/dist/esm/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.d.mts +11 -0
  153. package/dist/esm/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.mjs +2 -0
  154. package/dist/esm/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.d.mts +11 -0
  155. package/dist/esm/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.mjs +2 -0
  156. package/dist/esm/api/resources/business/resources/gallery/client/requests/index.d.mts +4 -0
  157. package/dist/esm/api/resources/business/resources/gallery/client/requests/index.mjs +1 -0
  158. package/dist/esm/api/resources/business/resources/gallery/exports.d.mts +2 -0
  159. package/dist/esm/api/resources/business/resources/gallery/exports.mjs +3 -0
  160. package/dist/esm/api/resources/business/resources/gallery/index.d.mts +2 -0
  161. package/dist/esm/api/resources/business/resources/gallery/index.mjs +2 -0
  162. package/dist/esm/api/resources/business/resources/gallery/types/DeleteGalleryResponse.d.mts +9 -0
  163. package/dist/esm/api/resources/business/resources/gallery/types/DeleteGalleryResponse.mjs +7 -0
  164. package/dist/esm/api/resources/business/resources/gallery/types/ListGalleryResponse.d.mts +4 -0
  165. package/dist/esm/api/resources/business/resources/gallery/types/ListGalleryResponse.mjs +2 -0
  166. package/dist/esm/api/resources/business/resources/gallery/types/ReorderGalleryResponse.d.mts +9 -0
  167. package/dist/esm/api/resources/business/resources/gallery/types/ReorderGalleryResponse.mjs +7 -0
  168. package/dist/esm/api/resources/business/resources/gallery/types/UpdateGalleryResponse.d.mts +4 -0
  169. package/dist/esm/api/resources/business/resources/gallery/types/UpdateGalleryResponse.mjs +2 -0
  170. package/dist/esm/api/resources/business/resources/gallery/types/UploadGalleryResponse.d.mts +4 -0
  171. package/dist/esm/api/resources/business/resources/gallery/types/UploadGalleryResponse.mjs +2 -0
  172. package/dist/esm/api/resources/business/resources/gallery/types/index.d.mts +5 -0
  173. package/dist/esm/api/resources/business/resources/gallery/types/index.mjs +5 -0
  174. package/dist/esm/api/resources/business/resources/index.d.mts +4 -0
  175. package/dist/esm/api/resources/business/resources/index.mjs +4 -0
  176. package/dist/esm/api/resources/business/resources/messaging/client/Client.d.mts +15 -0
  177. package/dist/esm/api/resources/business/resources/messaging/client/Client.mjs +17 -0
  178. package/dist/esm/api/resources/business/resources/messaging/client/index.d.mts +1 -0
  179. package/dist/esm/api/resources/business/resources/messaging/client/index.mjs +1 -0
  180. package/dist/esm/api/resources/business/resources/messaging/exports.d.mts +3 -0
  181. package/dist/esm/api/resources/business/resources/messaging/exports.mjs +4 -0
  182. package/dist/esm/api/resources/business/resources/messaging/index.d.mts +2 -0
  183. package/dist/esm/api/resources/business/resources/messaging/index.mjs +2 -0
  184. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/Client.d.mts +45 -0
  185. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/Client.mjs +145 -0
  186. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/index.d.mts +1 -0
  187. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/index.mjs +1 -0
  188. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.d.mts +10 -0
  189. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.mjs +2 -0
  190. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.d.mts +10 -0
  191. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.mjs +2 -0
  192. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/index.d.mts +2 -0
  193. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/index.mjs +1 -0
  194. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/exports.d.mts +2 -0
  195. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/exports.mjs +3 -0
  196. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/index.d.mts +2 -0
  197. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/index.mjs +2 -0
  198. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.d.mts +4 -0
  199. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.mjs +2 -0
  200. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.d.mts +4 -0
  201. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.mjs +2 -0
  202. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/index.d.mts +2 -0
  203. package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/index.mjs +2 -0
  204. package/dist/esm/api/resources/business/resources/messaging/resources/index.d.mts +6 -0
  205. package/dist/esm/api/resources/business/resources/messaging/resources/index.mjs +6 -0
  206. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/Client.d.mts +81 -0
  207. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/Client.mjs +275 -0
  208. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/index.d.mts +1 -0
  209. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/index.mjs +1 -0
  210. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.d.mts +14 -0
  211. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.mjs +2 -0
  212. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.d.mts +10 -0
  213. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.mjs +2 -0
  214. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.d.mts +22 -0
  215. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.mjs +9 -0
  216. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.d.mts +10 -0
  217. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.mjs +2 -0
  218. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/index.d.mts +4 -0
  219. package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/index.mjs +1 -0
  220. package/dist/esm/api/resources/business/resources/messaging/resources/messages/exports.d.mts +2 -0
  221. package/dist/esm/api/resources/business/resources/messaging/resources/messages/exports.mjs +3 -0
  222. package/dist/esm/api/resources/business/resources/messaging/resources/messages/index.d.mts +2 -0
  223. package/dist/esm/api/resources/business/resources/messaging/resources/messages/index.mjs +2 -0
  224. package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.d.mts +4 -0
  225. package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.mjs +2 -0
  226. package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.d.mts +4 -0
  227. package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.mjs +2 -0
  228. package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/index.d.mts +2 -0
  229. package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/index.mjs +2 -0
  230. package/dist/esm/api/resources/businessMessaging/client/Client.d.mts +32 -0
  231. package/dist/esm/api/resources/businessMessaging/client/Client.mjs +81 -0
  232. package/dist/esm/api/resources/businessMessaging/client/index.d.mts +1 -0
  233. package/dist/esm/api/resources/businessMessaging/client/index.mjs +1 -0
  234. package/dist/esm/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.d.mts +13 -0
  235. package/dist/esm/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.mjs +2 -0
  236. package/dist/esm/api/resources/businessMessaging/client/requests/index.d.mts +1 -0
  237. package/dist/esm/api/resources/businessMessaging/client/requests/index.mjs +1 -0
  238. package/dist/esm/api/resources/businessMessaging/exports.d.mts +2 -0
  239. package/dist/esm/api/resources/businessMessaging/exports.mjs +3 -0
  240. package/dist/esm/api/resources/businessMessaging/index.d.mts +1 -0
  241. package/dist/esm/api/resources/businessMessaging/index.mjs +1 -0
  242. package/dist/esm/api/resources/businessPushNotifications/client/Client.d.mts +47 -0
  243. package/dist/esm/api/resources/businessPushNotifications/client/Client.mjs +145 -0
  244. package/dist/esm/api/resources/businessPushNotifications/client/index.d.mts +1 -0
  245. package/dist/esm/api/resources/businessPushNotifications/client/index.mjs +1 -0
  246. package/dist/esm/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.d.mts +9 -0
  247. package/dist/esm/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.mjs +2 -0
  248. package/dist/esm/api/resources/businessPushNotifications/client/requests/index.d.mts +2 -0
  249. package/dist/esm/api/resources/businessPushNotifications/client/requests/index.mjs +1 -0
  250. package/dist/esm/api/resources/businessPushNotifications/exports.d.mts +2 -0
  251. package/dist/esm/api/resources/businessPushNotifications/exports.mjs +3 -0
  252. package/dist/esm/api/resources/businessPushNotifications/index.d.mts +2 -0
  253. package/dist/esm/api/resources/businessPushNotifications/index.mjs +2 -0
  254. package/dist/esm/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.d.mts +7 -0
  255. package/dist/esm/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.mjs +2 -0
  256. package/dist/esm/api/resources/businessPushNotifications/types/index.d.mts +1 -0
  257. package/dist/esm/api/resources/businessPushNotifications/types/index.mjs +1 -0
  258. package/dist/esm/api/resources/customer/resources/pushNotifications/client/Client.d.mts +2 -2
  259. package/dist/esm/api/resources/customer/resources/pushNotifications/client/Client.mjs +1 -1
  260. package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.d.mts +19 -0
  261. package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.mjs +8 -0
  262. package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/index.d.mts +1 -1
  263. package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/index.mjs +1 -1
  264. package/dist/esm/api/resources/index.d.mts +5 -0
  265. package/dist/esm/api/resources/index.mjs +5 -0
  266. package/dist/esm/api/types/BusinessConversation.d.mts +20 -0
  267. package/dist/esm/api/types/BusinessConversation.mjs +2 -0
  268. package/dist/esm/api/types/BusinessMessage.d.mts +20 -0
  269. package/dist/esm/api/types/BusinessMessage.mjs +2 -0
  270. package/dist/esm/api/types/BusinessPhoto.d.mts +9 -0
  271. package/dist/esm/api/types/BusinessPhoto.mjs +2 -0
  272. package/dist/esm/api/types/index.d.mts +3 -0
  273. package/dist/esm/api/types/index.mjs +3 -0
  274. package/dist/esm/version.d.mts +1 -1
  275. package/dist/esm/version.mjs +1 -1
  276. package/package.json +67 -1
  277. package/reference.md +1116 -271
  278. /package/dist/cjs/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.d.ts +0 -0
  279. /package/dist/cjs/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.js +0 -0
  280. /package/dist/esm/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.d.mts +0 -0
  281. /package/dist/esm/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.mjs +0 -0
@@ -0,0 +1,32 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../index.js";
5
+ export declare namespace BusinessMessagingClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class BusinessMessagingClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<BusinessMessagingClient.Options>;
12
+ constructor(options?: BusinessMessagingClient.Options);
13
+ /**
14
+ * This endpoint is used by the business companion mobile app to authenticate with
15
+ * Pusher channels. It validates that the authenticated business user has
16
+ * permission to access the requested channel, scoped to their active business.
17
+ *
18
+ * @param {FiveOneEat.BusinessChannelAuthAuthenticateRequest} request
19
+ * @param {BusinessMessagingClient.RequestOptions} requestOptions - Request-specific configuration.
20
+ *
21
+ * @throws {@link FiveOneEat.UnauthorizedError}
22
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
23
+ *
24
+ * @example
25
+ * await client.businessMessaging.businessChannelAuthAuthenticate({
26
+ * channel_name: "channel_name",
27
+ * socket_id: "socket_id"
28
+ * })
29
+ */
30
+ businessChannelAuthAuthenticate(request: FiveOneEat.BusinessChannelAuthAuthenticateRequest, requestOptions?: BusinessMessagingClient.RequestOptions): core.HttpResponsePromise<number>;
31
+ private __businessChannelAuthAuthenticate;
32
+ }
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.BusinessMessagingClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../index.js"));
54
+ class BusinessMessagingClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * This endpoint is used by the business companion mobile app to authenticate with
60
+ * Pusher channels. It validates that the authenticated business user has
61
+ * permission to access the requested channel, scoped to their active business.
62
+ *
63
+ * @param {FiveOneEat.BusinessChannelAuthAuthenticateRequest} request
64
+ * @param {BusinessMessagingClient.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link FiveOneEat.UnauthorizedError}
67
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.businessMessaging.businessChannelAuthAuthenticate({
71
+ * channel_name: "channel_name",
72
+ * socket_id: "socket_id"
73
+ * })
74
+ */
75
+ businessChannelAuthAuthenticate(request, requestOptions) {
76
+ return core.HttpResponsePromise.fromPromise(this.__businessChannelAuthAuthenticate(request, requestOptions));
77
+ }
78
+ __businessChannelAuthAuthenticate(request, requestOptions) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
81
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
82
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
83
+ const _response = yield core.fetcher({
84
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/channels/auth"),
85
+ method: "POST",
86
+ headers: _headers,
87
+ contentType: "application/json",
88
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
89
+ requestType: "json",
90
+ body: request,
91
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
92
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
93
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
94
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
95
+ logging: this._options.logging,
96
+ });
97
+ if (_response.ok) {
98
+ return { data: _response.body, rawResponse: _response.rawResponse };
99
+ }
100
+ if (_response.error.reason === "status-code") {
101
+ switch (_response.error.statusCode) {
102
+ case 401:
103
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
104
+ case 422:
105
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
106
+ default:
107
+ throw new errors.FiveOneEatError({
108
+ statusCode: _response.error.statusCode,
109
+ body: _response.error.body,
110
+ rawResponse: _response.rawResponse,
111
+ });
112
+ }
113
+ }
114
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/channels/auth");
115
+ });
116
+ }
117
+ }
118
+ exports.BusinessMessagingClient = BusinessMessagingClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * channel_name: "channel_name",
5
+ * socket_id: "socket_id"
6
+ * }
7
+ */
8
+ export interface BusinessChannelAuthAuthenticateRequest {
9
+ /** string */
10
+ channel_name: string;
11
+ /** string */
12
+ socket_id: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { BusinessChannelAuthAuthenticateRequest } from "./BusinessChannelAuthAuthenticateRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { BusinessMessagingClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.BusinessMessagingClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "BusinessMessagingClient", { enumerable: true, get: function () { return Client_js_1.BusinessMessagingClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,47 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../index.js";
5
+ export declare namespace BusinessPushNotificationsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class BusinessPushNotificationsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<BusinessPushNotificationsClient.Options>;
12
+ constructor(options?: BusinessPushNotificationsClient.Options);
13
+ /**
14
+ * Register (or update) the authenticated business user's Expo push token for a
15
+ * device. If a `device_id` is provided, an existing registration for that device
16
+ * is updated.
17
+ *
18
+ * @param {FiveOneEat.StorePushTokenRequest} request
19
+ * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
20
+ *
21
+ * @throws {@link FiveOneEat.UnauthorizedError}
22
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
23
+ *
24
+ * @example
25
+ * await client.businessPushNotifications.registerBusinessPushToken({
26
+ * token: "token"
27
+ * })
28
+ */
29
+ registerBusinessPushToken(request: FiveOneEat.StorePushTokenRequest, requestOptions?: BusinessPushNotificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.RegisterBusinessPushTokenResponse>;
30
+ private __registerBusinessPushToken;
31
+ /**
32
+ * Delete the authenticated business user's Expo push token registration.
33
+ *
34
+ * @param {FiveOneEat.UnregisterBusinessPushTokenRequest} request
35
+ * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link FiveOneEat.UnauthorizedError}
38
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
39
+ *
40
+ * @example
41
+ * await client.businessPushNotifications.unregisterBusinessPushToken({
42
+ * token: "token"
43
+ * })
44
+ */
45
+ unregisterBusinessPushToken(request: FiveOneEat.UnregisterBusinessPushTokenRequest, requestOptions?: BusinessPushNotificationsClient.RequestOptions): core.HttpResponsePromise<void>;
46
+ private __unregisterBusinessPushToken;
47
+ }
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.BusinessPushNotificationsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../index.js"));
54
+ class BusinessPushNotificationsClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Register (or update) the authenticated business user's Expo push token for a
60
+ * device. If a `device_id` is provided, an existing registration for that device
61
+ * is updated.
62
+ *
63
+ * @param {FiveOneEat.StorePushTokenRequest} request
64
+ * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link FiveOneEat.UnauthorizedError}
67
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.businessPushNotifications.registerBusinessPushToken({
71
+ * token: "token"
72
+ * })
73
+ */
74
+ registerBusinessPushToken(request, requestOptions) {
75
+ return core.HttpResponsePromise.fromPromise(this.__registerBusinessPushToken(request, requestOptions));
76
+ }
77
+ __registerBusinessPushToken(request, requestOptions) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
80
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
81
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
82
+ const _response = yield core.fetcher({
83
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/push-tokens"),
84
+ method: "POST",
85
+ headers: _headers,
86
+ contentType: "application/json",
87
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
88
+ requestType: "json",
89
+ body: request,
90
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
91
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
92
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
93
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
94
+ logging: this._options.logging,
95
+ });
96
+ if (_response.ok) {
97
+ return {
98
+ data: _response.body,
99
+ rawResponse: _response.rawResponse,
100
+ };
101
+ }
102
+ if (_response.error.reason === "status-code") {
103
+ switch (_response.error.statusCode) {
104
+ case 401:
105
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
106
+ case 422:
107
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
108
+ default:
109
+ throw new errors.FiveOneEatError({
110
+ statusCode: _response.error.statusCode,
111
+ body: _response.error.body,
112
+ rawResponse: _response.rawResponse,
113
+ });
114
+ }
115
+ }
116
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/push-tokens");
117
+ });
118
+ }
119
+ /**
120
+ * Delete the authenticated business user's Expo push token registration.
121
+ *
122
+ * @param {FiveOneEat.UnregisterBusinessPushTokenRequest} request
123
+ * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
124
+ *
125
+ * @throws {@link FiveOneEat.UnauthorizedError}
126
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
127
+ *
128
+ * @example
129
+ * await client.businessPushNotifications.unregisterBusinessPushToken({
130
+ * token: "token"
131
+ * })
132
+ */
133
+ unregisterBusinessPushToken(request, requestOptions) {
134
+ return core.HttpResponsePromise.fromPromise(this.__unregisterBusinessPushToken(request, requestOptions));
135
+ }
136
+ __unregisterBusinessPushToken(request, requestOptions) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
139
+ const { token } = request;
140
+ const _queryParams = {
141
+ token,
142
+ };
143
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
144
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
145
+ const _response = yield core.fetcher({
146
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/push-tokens"),
147
+ method: "DELETE",
148
+ headers: _headers,
149
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
150
+ queryString: core.url
151
+ .queryBuilder()
152
+ .addMany(_queryParams)
153
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
154
+ .build(),
155
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
156
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
157
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
158
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
159
+ logging: this._options.logging,
160
+ });
161
+ if (_response.ok) {
162
+ return { data: undefined, rawResponse: _response.rawResponse };
163
+ }
164
+ if (_response.error.reason === "status-code") {
165
+ switch (_response.error.statusCode) {
166
+ case 401:
167
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
168
+ case 422:
169
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
170
+ default:
171
+ throw new errors.FiveOneEatError({
172
+ statusCode: _response.error.statusCode,
173
+ body: _response.error.body,
174
+ rawResponse: _response.rawResponse,
175
+ });
176
+ }
177
+ }
178
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/business/push-tokens");
179
+ });
180
+ }
181
+ }
182
+ exports.BusinessPushNotificationsClient = BusinessPushNotificationsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * token: "token"
5
+ * }
6
+ */
7
+ export interface UnregisterBusinessPushTokenRequest {
8
+ token: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { StorePushTokenRequest } from "./StorePushTokenRequest.js";
2
+ export type { UnregisterBusinessPushTokenRequest } from "./UnregisterBusinessPushTokenRequest.js";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StorePushTokenRequest = void 0;
4
+ var StorePushTokenRequest_js_1 = require("./StorePushTokenRequest.js");
5
+ Object.defineProperty(exports, "StorePushTokenRequest", { enumerable: true, get: function () { return StorePushTokenRequest_js_1.StorePushTokenRequest; } });
@@ -0,0 +1,2 @@
1
+ export { BusinessPushNotificationsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.BusinessPushNotificationsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "BusinessPushNotificationsClient", { enumerable: true, get: function () { return Client_js_1.BusinessPushNotificationsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,7 @@
1
+ export interface RegisterBusinessPushTokenResponse {
2
+ id: string;
3
+ token: string;
4
+ device_id: string;
5
+ device_name: string;
6
+ platform: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./RegisterBusinessPushTokenResponse.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RegisterBusinessPushTokenResponse.js"), exports);
@@ -14,7 +14,7 @@ export declare class PushNotificationsClient {
14
14
  * Register (or update) the authenticated user's Expo push token for a device. If
15
15
  * a `device_id` is provided, an existing registration for that device is updated.
16
16
  *
17
- * @param {FiveOneEat.customer.StorePushTokenRequest} request
17
+ * @param {FiveOneEat.customer.AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest} request
18
18
  * @param {PushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
19
19
  *
20
20
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -25,7 +25,7 @@ export declare class PushNotificationsClient {
25
25
  * token: "token"
26
26
  * })
27
27
  */
28
- register(request: FiveOneEat.customer.StorePushTokenRequest, requestOptions?: PushNotificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.RegisterPushNotificationsResponse>;
28
+ register(request: FiveOneEat.customer.AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest, requestOptions?: PushNotificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.RegisterPushNotificationsResponse>;
29
29
  private __register;
30
30
  /**
31
31
  * Delete the authenticated user's Expo push token registration.