@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.
- package/README.md +15 -18
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +20 -10
- package/dist/cjs/api/resources/business/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/business/client/Client.js +14 -4
- package/dist/cjs/api/resources/business/resources/gallery/client/Client.d.ts +86 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/Client.js +364 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.d.ts +21 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.d.ts +11 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.d.ts +11 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/gallery/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/gallery/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/gallery/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/gallery/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/DeleteGalleryResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/DeleteGalleryResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/ListGalleryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/ListGalleryResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/ReorderGalleryResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/ReorderGalleryResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/UpdateGalleryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/UpdateGalleryResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/UploadGalleryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/UploadGalleryResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/business/resources/gallery/types/index.js +21 -0
- package/dist/cjs/api/resources/business/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/index.js +5 -1
- package/dist/cjs/api/resources/business/resources/messaging/client/Client.d.ts +15 -0
- package/dist/cjs/api/resources/business/resources/messaging/client/Client.js +21 -0
- package/dist/cjs/api/resources/business/resources/messaging/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/messaging/client/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/exports.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/exports.js +22 -0
- package/dist/cjs/api/resources/business/resources/messaging/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/Client.d.ts +45 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/Client.js +182 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/conversations/types/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/index.d.ts +6 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/index.js +45 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/Client.d.ts +81 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/Client.js +312 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.d.ts +22 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.js +12 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/messaging/resources/messages/types/index.js +18 -0
- package/dist/cjs/api/resources/businessMessaging/client/Client.d.ts +32 -0
- package/dist/cjs/api/resources/businessMessaging/client/Client.js +118 -0
- package/dist/cjs/api/resources/businessMessaging/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessMessaging/client/index.js +17 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.d.ts +13 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.js +3 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/businessMessaging/exports.d.ts +2 -0
- package/dist/cjs/api/resources/businessMessaging/exports.js +21 -0
- package/dist/cjs/api/resources/businessMessaging/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessMessaging/index.js +17 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/Client.d.ts +47 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/Client.js +182 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/index.js +17 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.d.ts +9 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.js +3 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/businessPushNotifications/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/businessPushNotifications/exports.d.ts +2 -0
- package/dist/cjs/api/resources/businessPushNotifications/exports.js +21 -0
- package/dist/cjs/api/resources/businessPushNotifications/index.d.ts +2 -0
- package/dist/cjs/api/resources/businessPushNotifications/index.js +18 -0
- package/dist/cjs/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.d.ts +7 -0
- package/dist/cjs/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.js +3 -0
- package/dist/cjs/api/resources/businessPushNotifications/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessPushNotifications/types/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/pushNotifications/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/customer/resources/pushNotifications/client/Client.js +1 -1
- package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.d.ts +19 -0
- package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.js +11 -0
- package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/pushNotifications/client/requests/index.js +3 -3
- package/dist/cjs/api/resources/index.d.ts +5 -0
- package/dist/cjs/api/resources/index.js +6 -1
- package/dist/cjs/api/types/BusinessConversation.d.ts +20 -0
- package/dist/cjs/api/types/BusinessConversation.js +3 -0
- package/dist/cjs/api/types/BusinessMessage.d.ts +20 -0
- package/dist/cjs/api/types/BusinessMessage.js +3 -0
- package/dist/cjs/api/types/BusinessPhoto.d.ts +9 -0
- package/dist/cjs/api/types/BusinessPhoto.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +10 -0
- package/dist/esm/api/resources/business/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/business/client/Client.mjs +10 -0
- package/dist/esm/api/resources/business/resources/gallery/client/Client.d.mts +86 -0
- package/dist/esm/api/resources/business/resources/gallery/client/Client.mjs +327 -0
- package/dist/esm/api/resources/business/resources/gallery/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/gallery/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/DeleteGalleryRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.d.mts +21 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.d.mts +11 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.d.mts +11 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/UpdateGalleryPhotoRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/gallery/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/gallery/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/gallery/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/gallery/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/types/DeleteGalleryResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/gallery/types/DeleteGalleryResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/gallery/types/ListGalleryResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/gallery/types/ListGalleryResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/types/ReorderGalleryResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/gallery/types/ReorderGalleryResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/gallery/types/UpdateGalleryResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/gallery/types/UpdateGalleryResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/types/UploadGalleryResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/gallery/types/UploadGalleryResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/gallery/types/index.d.mts +5 -0
- package/dist/esm/api/resources/business/resources/gallery/types/index.mjs +5 -0
- package/dist/esm/api/resources/business/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/index.mjs +4 -0
- package/dist/esm/api/resources/business/resources/messaging/client/Client.d.mts +15 -0
- package/dist/esm/api/resources/business/resources/messaging/client/Client.mjs +17 -0
- package/dist/esm/api/resources/business/resources/messaging/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/messaging/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/messaging/exports.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/messaging/exports.mjs +4 -0
- package/dist/esm/api/resources/business/resources/messaging/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/Client.d.mts +45 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/Client.mjs +145 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/GetConversationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/ListConversationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/GetConversationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/ListConversationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/conversations/types/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/index.d.mts +6 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/index.mjs +6 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/Client.d.mts +81 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/Client.mjs +275 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/ListMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/MarkAsReadMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.d.mts +22 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/StoreMessageRequest.mjs +9 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/UnreadCountMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/ListMessagesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/SendMessagesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/messaging/resources/messages/types/index.mjs +2 -0
- package/dist/esm/api/resources/businessMessaging/client/Client.d.mts +32 -0
- package/dist/esm/api/resources/businessMessaging/client/Client.mjs +81 -0
- package/dist/esm/api/resources/businessMessaging/client/index.d.mts +1 -0
- package/dist/esm/api/resources/businessMessaging/client/index.mjs +1 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.d.mts +13 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.mjs +2 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/businessMessaging/exports.d.mts +2 -0
- package/dist/esm/api/resources/businessMessaging/exports.mjs +3 -0
- package/dist/esm/api/resources/businessMessaging/index.d.mts +1 -0
- package/dist/esm/api/resources/businessMessaging/index.mjs +1 -0
- package/dist/esm/api/resources/businessPushNotifications/client/Client.d.mts +47 -0
- package/dist/esm/api/resources/businessPushNotifications/client/Client.mjs +145 -0
- package/dist/esm/api/resources/businessPushNotifications/client/index.d.mts +1 -0
- package/dist/esm/api/resources/businessPushNotifications/client/index.mjs +1 -0
- package/dist/esm/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.d.mts +9 -0
- package/dist/esm/api/resources/businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.mjs +2 -0
- package/dist/esm/api/resources/businessPushNotifications/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/businessPushNotifications/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/businessPushNotifications/exports.d.mts +2 -0
- package/dist/esm/api/resources/businessPushNotifications/exports.mjs +3 -0
- package/dist/esm/api/resources/businessPushNotifications/index.d.mts +2 -0
- package/dist/esm/api/resources/businessPushNotifications/index.mjs +2 -0
- package/dist/esm/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.d.mts +7 -0
- package/dist/esm/api/resources/businessPushNotifications/types/RegisterBusinessPushTokenResponse.mjs +2 -0
- package/dist/esm/api/resources/businessPushNotifications/types/index.d.mts +1 -0
- package/dist/esm/api/resources/businessPushNotifications/types/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/pushNotifications/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/customer/resources/pushNotifications/client/Client.mjs +1 -1
- package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.d.mts +19 -0
- package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/AppHttpRequestsApiV1CustomerPushTokensStorePushTokenRequest.mjs +8 -0
- package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/pushNotifications/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +5 -0
- package/dist/esm/api/resources/index.mjs +5 -0
- package/dist/esm/api/types/BusinessConversation.d.mts +20 -0
- package/dist/esm/api/types/BusinessConversation.mjs +2 -0
- package/dist/esm/api/types/BusinessMessage.d.mts +20 -0
- package/dist/esm/api/types/BusinessMessage.mjs +2 -0
- package/dist/esm/api/types/BusinessPhoto.d.mts +9 -0
- package/dist/esm/api/types/BusinessPhoto.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +67 -1
- package/reference.md +1116 -271
- /package/dist/cjs/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.js +0 -0
- /package/dist/esm/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customer/resources/pushNotifications → businessPushNotifications}/client/requests/StorePushTokenRequest.mjs +0 -0
|
@@ -0,0 +1,364 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.GalleryClient = void 0;
|
|
58
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
59
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
60
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
61
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
62
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
63
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
64
|
+
const FiveOneEat = __importStar(require("../../../../../index.js"));
|
|
65
|
+
class GalleryClient {
|
|
66
|
+
constructor(options = {}) {
|
|
67
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @param {GalleryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.business.gallery.list()
|
|
76
|
+
*/
|
|
77
|
+
list(requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
79
|
+
}
|
|
80
|
+
__list(requestOptions) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
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);
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
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/gallery"),
|
|
87
|
+
method: "GET",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
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
|
+
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, "GET", "/business/gallery");
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @param {FiveOneEat.business.StoreGalleryPhotoRequest} request
|
|
119
|
+
* @param {GalleryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
122
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* import { createReadStream } from "fs";
|
|
126
|
+
* await client.business.gallery.upload({
|
|
127
|
+
* photo: fs.createReadStream("/path/to/your/file")
|
|
128
|
+
* })
|
|
129
|
+
*/
|
|
130
|
+
upload(request, requestOptions) {
|
|
131
|
+
return core.HttpResponsePromise.fromPromise(this.__upload(request, requestOptions));
|
|
132
|
+
}
|
|
133
|
+
__upload(request, requestOptions) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
136
|
+
const _body = yield core.newFormData();
|
|
137
|
+
yield _body.appendFile("photo", request.photo);
|
|
138
|
+
if (request.alt_text != null) {
|
|
139
|
+
_body.append("alt_text", request.alt_text);
|
|
140
|
+
}
|
|
141
|
+
const _maybeEncodedRequest = yield _body.getRequest();
|
|
142
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
143
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
144
|
+
const _response = yield core.fetcher({
|
|
145
|
+
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/gallery"),
|
|
146
|
+
method: "POST",
|
|
147
|
+
headers: _headers,
|
|
148
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
149
|
+
requestType: "file",
|
|
150
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
151
|
+
body: _maybeEncodedRequest.body,
|
|
152
|
+
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,
|
|
153
|
+
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,
|
|
154
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
155
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
156
|
+
logging: this._options.logging,
|
|
157
|
+
});
|
|
158
|
+
if (_response.ok) {
|
|
159
|
+
return {
|
|
160
|
+
data: _response.body,
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
};
|
|
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, "POST", "/business/gallery");
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @param {FiveOneEat.business.ReorderGalleryRequest} request
|
|
183
|
+
* @param {GalleryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
184
|
+
*
|
|
185
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
186
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* await client.business.gallery.reorder({
|
|
190
|
+
* photos: [{
|
|
191
|
+
* id: "id",
|
|
192
|
+
* sort_order: 1
|
|
193
|
+
* }]
|
|
194
|
+
* })
|
|
195
|
+
*/
|
|
196
|
+
reorder(request, requestOptions) {
|
|
197
|
+
return core.HttpResponsePromise.fromPromise(this.__reorder(request, requestOptions));
|
|
198
|
+
}
|
|
199
|
+
__reorder(request, requestOptions) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
202
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
203
|
+
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);
|
|
204
|
+
const _response = yield core.fetcher({
|
|
205
|
+
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/gallery/reorder"),
|
|
206
|
+
method: "PUT",
|
|
207
|
+
headers: _headers,
|
|
208
|
+
contentType: "application/json",
|
|
209
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
210
|
+
requestType: "json",
|
|
211
|
+
body: request,
|
|
212
|
+
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,
|
|
213
|
+
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,
|
|
214
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
215
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
216
|
+
logging: this._options.logging,
|
|
217
|
+
});
|
|
218
|
+
if (_response.ok) {
|
|
219
|
+
return {
|
|
220
|
+
data: _response.body,
|
|
221
|
+
rawResponse: _response.rawResponse,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
if (_response.error.reason === "status-code") {
|
|
225
|
+
switch (_response.error.statusCode) {
|
|
226
|
+
case 401:
|
|
227
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
228
|
+
case 422:
|
|
229
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
230
|
+
default:
|
|
231
|
+
throw new errors.FiveOneEatError({
|
|
232
|
+
statusCode: _response.error.statusCode,
|
|
233
|
+
body: _response.error.body,
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/gallery/reorder");
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @param {FiveOneEat.business.UpdateGalleryPhotoRequest} request
|
|
243
|
+
* @param {GalleryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
244
|
+
*
|
|
245
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
246
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
247
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
248
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* await client.business.gallery.update({
|
|
252
|
+
* photo: "photo"
|
|
253
|
+
* })
|
|
254
|
+
*/
|
|
255
|
+
update(request, requestOptions) {
|
|
256
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
257
|
+
}
|
|
258
|
+
__update(request, requestOptions) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
261
|
+
const { photo } = request, _body = __rest(request, ["photo"]);
|
|
262
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
263
|
+
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);
|
|
264
|
+
const _response = yield core.fetcher({
|
|
265
|
+
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/gallery/${core.url.encodePathParam(photo)}`),
|
|
266
|
+
method: "PUT",
|
|
267
|
+
headers: _headers,
|
|
268
|
+
contentType: "application/json",
|
|
269
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
270
|
+
requestType: "json",
|
|
271
|
+
body: _body,
|
|
272
|
+
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,
|
|
273
|
+
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,
|
|
274
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
275
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
276
|
+
logging: this._options.logging,
|
|
277
|
+
});
|
|
278
|
+
if (_response.ok) {
|
|
279
|
+
return {
|
|
280
|
+
data: _response.body,
|
|
281
|
+
rawResponse: _response.rawResponse,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
if (_response.error.reason === "status-code") {
|
|
285
|
+
switch (_response.error.statusCode) {
|
|
286
|
+
case 401:
|
|
287
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
288
|
+
case 403:
|
|
289
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
290
|
+
case 404:
|
|
291
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
292
|
+
case 422:
|
|
293
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
294
|
+
default:
|
|
295
|
+
throw new errors.FiveOneEatError({
|
|
296
|
+
statusCode: _response.error.statusCode,
|
|
297
|
+
body: _response.error.body,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/gallery/{photo}");
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* @param {FiveOneEat.business.DeleteGalleryRequest} request
|
|
307
|
+
* @param {GalleryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
308
|
+
*
|
|
309
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
310
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
311
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* await client.business.gallery.delete({
|
|
315
|
+
* photo: "photo"
|
|
316
|
+
* })
|
|
317
|
+
*/
|
|
318
|
+
delete(request, requestOptions) {
|
|
319
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
320
|
+
}
|
|
321
|
+
__delete(request, requestOptions) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
324
|
+
const { photo } = request;
|
|
325
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
326
|
+
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);
|
|
327
|
+
const _response = yield core.fetcher({
|
|
328
|
+
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/gallery/${core.url.encodePathParam(photo)}`),
|
|
329
|
+
method: "DELETE",
|
|
330
|
+
headers: _headers,
|
|
331
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
332
|
+
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,
|
|
333
|
+
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,
|
|
334
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
335
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
336
|
+
logging: this._options.logging,
|
|
337
|
+
});
|
|
338
|
+
if (_response.ok) {
|
|
339
|
+
return {
|
|
340
|
+
data: _response.body,
|
|
341
|
+
rawResponse: _response.rawResponse,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
if (_response.error.reason === "status-code") {
|
|
345
|
+
switch (_response.error.statusCode) {
|
|
346
|
+
case 401:
|
|
347
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
348
|
+
case 403:
|
|
349
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
350
|
+
case 404:
|
|
351
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
352
|
+
default:
|
|
353
|
+
throw new errors.FiveOneEatError({
|
|
354
|
+
statusCode: _response.error.statusCode,
|
|
355
|
+
body: _response.error.body,
|
|
356
|
+
rawResponse: _response.rawResponse,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/business/gallery/{photo}");
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
exports.GalleryClient = GalleryClient;
|
|
@@ -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);
|
package/dist/cjs/api/resources/business/resources/gallery/client/requests/ReorderGalleryRequest.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* photos: [{
|
|
5
|
+
* id: "id",
|
|
6
|
+
* sort_order: 1
|
|
7
|
+
* }]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface ReorderGalleryRequest {
|
|
11
|
+
photos: ReorderGalleryRequest.Photos.Item[];
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ReorderGalleryRequest {
|
|
14
|
+
type Photos = Photos.Item[];
|
|
15
|
+
namespace Photos {
|
|
16
|
+
interface Item {
|
|
17
|
+
id: string;
|
|
18
|
+
sort_order: number;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as core from "../../../../../../../core/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* photo: fs.createReadStream("/path/to/your/file")
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface StoreGalleryPhotoRequest {
|
|
9
|
+
photo: core.file.Uploadable;
|
|
10
|
+
alt_text?: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DeleteGalleryRequest } from "./DeleteGalleryRequest.js";
|
|
2
|
+
export type { ReorderGalleryRequest } from "./ReorderGalleryRequest.js";
|
|
3
|
+
export type { StoreGalleryPhotoRequest } from "./StoreGalleryPhotoRequest.js";
|
|
4
|
+
export type { UpdateGalleryPhotoRequest } from "./UpdateGalleryPhotoRequest.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.GalleryClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "GalleryClient", { enumerable: true, get: function () { return Client_js_1.GalleryClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -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,9 @@
|
|
|
1
|
+
export interface DeleteGalleryResponse {
|
|
2
|
+
message: DeleteGalleryResponse.Message;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace DeleteGalleryResponse {
|
|
5
|
+
const Message: {
|
|
6
|
+
readonly PhotoDeletedSuccessfully: "Photo deleted successfully.";
|
|
7
|
+
};
|
|
8
|
+
type Message = (typeof Message)[keyof typeof Message];
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DeleteGalleryResponse = void 0;
|
|
5
|
+
var DeleteGalleryResponse;
|
|
6
|
+
(function (DeleteGalleryResponse) {
|
|
7
|
+
DeleteGalleryResponse.Message = {
|
|
8
|
+
PhotoDeletedSuccessfully: "Photo deleted successfully.",
|
|
9
|
+
};
|
|
10
|
+
})(DeleteGalleryResponse || (exports.DeleteGalleryResponse = DeleteGalleryResponse = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ReorderGalleryResponse {
|
|
2
|
+
message: ReorderGalleryResponse.Message;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ReorderGalleryResponse {
|
|
5
|
+
const Message: {
|
|
6
|
+
readonly PhotoOrderUpdatedSuccessfully: "Photo order updated successfully.";
|
|
7
|
+
};
|
|
8
|
+
type Message = (typeof Message)[keyof typeof Message];
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ReorderGalleryResponse = void 0;
|
|
5
|
+
var ReorderGalleryResponse;
|
|
6
|
+
(function (ReorderGalleryResponse) {
|
|
7
|
+
ReorderGalleryResponse.Message = {
|
|
8
|
+
PhotoOrderUpdatedSuccessfully: "Photo order updated successfully.",
|
|
9
|
+
};
|
|
10
|
+
})(ReorderGalleryResponse || (exports.ReorderGalleryResponse = ReorderGalleryResponse = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./DeleteGalleryResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ListGalleryResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ReorderGalleryResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./UpdateGalleryResponse.js"), exports);
|
|
21
|
+
__exportStar(require("./UploadGalleryResponse.js"), exports);
|