hey-pharmacist-ecommerce 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +269 -0
- package/dist/index.d.mts +564 -0
- package/dist/index.d.ts +564 -0
- package/dist/index.js +7541 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7485 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +70 -0
- package/src/components/CartItem.tsx +103 -0
- package/src/components/EmptyState.tsx +27 -0
- package/src/components/Footer.tsx +147 -0
- package/src/components/Header.tsx +151 -0
- package/src/components/OrderCard.tsx +98 -0
- package/src/components/ProductCard.tsx +122 -0
- package/src/components/ui/Badge.tsx +31 -0
- package/src/components/ui/Button.tsx +61 -0
- package/src/components/ui/Input.tsx +45 -0
- package/src/components/ui/Modal.tsx +79 -0
- package/src/components/ui/Skeleton.tsx +46 -0
- package/src/hooks/useOrders.ts +98 -0
- package/src/hooks/useProducts.ts +125 -0
- package/src/index.ts +71 -0
- package/src/lib/Apis/api.ts +46 -0
- package/src/lib/Apis/apis/addresses-api.ts +1461 -0
- package/src/lib/Apis/apis/auth-api.ts +945 -0
- package/src/lib/Apis/apis/blogs-api.ts +582 -0
- package/src/lib/Apis/apis/cart-api.ts +456 -0
- package/src/lib/Apis/apis/categories-api.ts +725 -0
- package/src/lib/Apis/apis/chats-api.ts +1101 -0
- package/src/lib/Apis/apis/contact-us-api.ts +394 -0
- package/src/lib/Apis/apis/discounts-api.ts +763 -0
- package/src/lib/Apis/apis/drafts-api.ts +448 -0
- package/src/lib/Apis/apis/events-api.ts +1311 -0
- package/src/lib/Apis/apis/file-proccesor-api.ts +293 -0
- package/src/lib/Apis/apis/health-api.ts +119 -0
- package/src/lib/Apis/apis/images-api.ts +271 -0
- package/src/lib/Apis/apis/inventory-api.ts +375 -0
- package/src/lib/Apis/apis/marketing-api.ts +3099 -0
- package/src/lib/Apis/apis/notifications-api.ts +843 -0
- package/src/lib/Apis/apis/open-aiapi.ts +513 -0
- package/src/lib/Apis/apis/orders-api.ts +1343 -0
- package/src/lib/Apis/apis/payment-methods-api.ts +411 -0
- package/src/lib/Apis/apis/payments-api.ts +469 -0
- package/src/lib/Apis/apis/product-attributes-api.ts +538 -0
- package/src/lib/Apis/apis/product-favorite-list-api.ts +321 -0
- package/src/lib/Apis/apis/product-variants-api.ts +648 -0
- package/src/lib/Apis/apis/products-api.ts +1442 -0
- package/src/lib/Apis/apis/review-api.ts +1383 -0
- package/src/lib/Apis/apis/roles-api.ts +614 -0
- package/src/lib/Apis/apis/shipping-api.ts +703 -0
- package/src/lib/Apis/apis/statistics-api.ts +234 -0
- package/src/lib/Apis/apis/stores-api.ts +1519 -0
- package/src/lib/Apis/apis/sub-categories-api.ts +1208 -0
- package/src/lib/Apis/apis/user-groups-api.ts +1198 -0
- package/src/lib/Apis/apis/users-api.ts +1403 -0
- package/src/lib/Apis/apis/web-hooks-api.ts +198 -0
- package/src/lib/Apis/base.ts +70 -0
- package/src/lib/Apis/configuration.ts +75 -0
- package/src/lib/Apis/index.ts +17 -0
- package/src/lib/Apis/models/add-contact-to-list-dto.ts +33 -0
- package/src/lib/Apis/models/add-message-dto.ts +56 -0
- package/src/lib/Apis/models/address-created-request.ts +134 -0
- package/src/lib/Apis/models/address.ts +164 -0
- package/src/lib/Apis/models/allow-user-credit-dto.ts +27 -0
- package/src/lib/Apis/models/appointment.ts +75 -0
- package/src/lib/Apis/models/available-dates-dto.ts +33 -0
- package/src/lib/Apis/models/available-suggested-dates-dto.ts +33 -0
- package/src/lib/Apis/models/blog.ts +75 -0
- package/src/lib/Apis/models/browser-stats-response-dto.ts +40 -0
- package/src/lib/Apis/models/bulk-move-subcategories-dto.ts +33 -0
- package/src/lib/Apis/models/bulk-unassign-subcategories-dto.ts +27 -0
- package/src/lib/Apis/models/campaign-content-response-dto.ts +40 -0
- package/src/lib/Apis/models/campaign-draft-dto.ts +175 -0
- package/src/lib/Apis/models/campaign-draft-response-dto.ts +40 -0
- package/src/lib/Apis/models/campaign-draft-schedule-dto.ts +49 -0
- package/src/lib/Apis/models/campaign-draft-schedule-response-dto.ts +40 -0
- package/src/lib/Apis/models/campaign-draft-sending-dto.ts +43 -0
- package/src/lib/Apis/models/campaign-draft-sending-response-dto.ts +40 -0
- package/src/lib/Apis/models/cart-body-dto.ts +40 -0
- package/src/lib/Apis/models/cart-body-populated.ts +47 -0
- package/src/lib/Apis/models/cart-item-populated.ts +41 -0
- package/src/lib/Apis/models/cart-item.ts +33 -0
- package/src/lib/Apis/models/cart-response-dto.ts +70 -0
- package/src/lib/Apis/models/categories-paginated-response-dto.ts +52 -0
- package/src/lib/Apis/models/category-filters.ts +40 -0
- package/src/lib/Apis/models/category-populated.ts +106 -0
- package/src/lib/Apis/models/category-sub-category-populated.ts +51 -0
- package/src/lib/Apis/models/category.ts +99 -0
- package/src/lib/Apis/models/categorys-headlines-response-dto.ts +40 -0
- package/src/lib/Apis/models/change-user-email-dto.ts +27 -0
- package/src/lib/Apis/models/chat.ts +33 -0
- package/src/lib/Apis/models/check-notifications-response-dto.ts +33 -0
- package/src/lib/Apis/models/contact-aggregated-stats-response-dto.ts +40 -0
- package/src/lib/Apis/models/contact-full-dto.ts +93 -0
- package/src/lib/Apis/models/contact-full-response-dto.ts +40 -0
- package/src/lib/Apis/models/contact-list-stats-response-dto.ts +40 -0
- package/src/lib/Apis/models/contact-lists-response-dto.ts +40 -0
- package/src/lib/Apis/models/contact-us.ts +81 -0
- package/src/lib/Apis/models/country-stats-response-dto.ts +40 -0
- package/src/lib/Apis/models/create-address-dto.ts +134 -0
- package/src/lib/Apis/models/create-blog-dto.ts +45 -0
- package/src/lib/Apis/models/create-category-dto.ts +45 -0
- package/src/lib/Apis/models/create-chat-dto.ts +39 -0
- package/src/lib/Apis/models/create-contact-dto.ts +39 -0
- package/src/lib/Apis/models/create-contact-list-dto.ts +27 -0
- package/src/lib/Apis/models/create-discount-dto.ts +208 -0
- package/src/lib/Apis/models/create-draft-dto.ts +67 -0
- package/src/lib/Apis/models/create-email-template-dto.ts +51 -0
- package/src/lib/Apis/models/create-event-dto.ts +52 -0
- package/src/lib/Apis/models/create-marketing-campaign-dto.ts +81 -0
- package/src/lib/Apis/models/create-message-dto.ts +57 -0
- package/src/lib/Apis/models/create-notification-dto.ts +75 -0
- package/src/lib/Apis/models/create-product-attribute-dto.ts +33 -0
- package/src/lib/Apis/models/create-product-dto.ts +94 -0
- package/src/lib/Apis/models/create-review-dto.ts +63 -0
- package/src/lib/Apis/models/create-role-dto.ts +57 -0
- package/src/lib/Apis/models/create-single-variant-product-dto.ts +155 -0
- package/src/lib/Apis/models/create-store-address-dto.ts +134 -0
- package/src/lib/Apis/models/create-store-dto.ts +105 -0
- package/src/lib/Apis/models/create-sub-category-dto.ts +45 -0
- package/src/lib/Apis/models/create-user-dto.ts +89 -0
- package/src/lib/Apis/models/create-user-group-dto.ts +39 -0
- package/src/lib/Apis/models/create-variant-dto.ts +119 -0
- package/src/lib/Apis/models/create-zone-dto.ts +82 -0
- package/src/lib/Apis/models/custom-product-dto.ts +63 -0
- package/src/lib/Apis/models/default-payment-method-request-dto.ts +27 -0
- package/src/lib/Apis/models/delete-file-dto.ts +27 -0
- package/src/lib/Apis/models/delete-many-files-dto.ts +27 -0
- package/src/lib/Apis/models/discount-paginated-response.ts +52 -0
- package/src/lib/Apis/models/discount.ts +245 -0
- package/src/lib/Apis/models/discounts-insights-dto.ts +57 -0
- package/src/lib/Apis/models/draft.ts +79 -0
- package/src/lib/Apis/models/email-invoice-dto.ts +45 -0
- package/src/lib/Apis/models/email-template-response-dto.ts +117 -0
- package/src/lib/Apis/models/event.ts +76 -0
- package/src/lib/Apis/models/extended-product-dto.ts +204 -0
- package/src/lib/Apis/models/fileproccesor-upload-body.ts +27 -0
- package/src/lib/Apis/models/forget-password.ts +27 -0
- package/src/lib/Apis/models/frequently-bought-product-dto.ts +71 -0
- package/src/lib/Apis/models/general-stats-response-dto.ts +40 -0
- package/src/lib/Apis/models/generate-day-slots-dto.ts +51 -0
- package/src/lib/Apis/models/generate-month-slots-dto.ts +57 -0
- package/src/lib/Apis/models/generate-week-slots-dto.ts +57 -0
- package/src/lib/Apis/models/google-analytics-request-dto.ts +55 -0
- package/src/lib/Apis/models/google-analytics-response-dto.ts +39 -0
- package/src/lib/Apis/models/group-with-no-users-dto.ts +75 -0
- package/src/lib/Apis/models/group-with-users-dto.ts +76 -0
- package/src/lib/Apis/models/images-upload-body.ts +27 -0
- package/src/lib/Apis/models/index.ts +197 -0
- package/src/lib/Apis/models/inventory-paginated-response.ts +75 -0
- package/src/lib/Apis/models/link-stats-response-dto.ts +40 -0
- package/src/lib/Apis/models/login-dto.ts +33 -0
- package/src/lib/Apis/models/manual-discount.ts +49 -0
- package/src/lib/Apis/models/manual-order-dto.ts +133 -0
- package/src/lib/Apis/models/manual-shipping-dto.ts +45 -0
- package/src/lib/Apis/models/marketing-campaign-content-dto.ts +27 -0
- package/src/lib/Apis/models/marketing-list-contact-dto.ts +51 -0
- package/src/lib/Apis/models/move-subcategory-dto.ts +27 -0
- package/src/lib/Apis/models/my-favorite-list-dto.ts +52 -0
- package/src/lib/Apis/models/notification.ts +93 -0
- package/src/lib/Apis/models/object-id.ts +21 -0
- package/src/lib/Apis/models/open-api.ts +33 -0
- package/src/lib/Apis/models/order-paginated-response.ts +52 -0
- package/src/lib/Apis/models/order.ts +214 -0
- package/src/lib/Apis/models/orders-insights-dto.ts +69 -0
- package/src/lib/Apis/models/paginated-products-dto.ts +52 -0
- package/src/lib/Apis/models/payment-method-data.ts +34 -0
- package/src/lib/Apis/models/payment-method.ts +51 -0
- package/src/lib/Apis/models/payment-time-line-dto.ts +56 -0
- package/src/lib/Apis/models/payment.ts +182 -0
- package/src/lib/Apis/models/payments-insights-dto.ts +69 -0
- package/src/lib/Apis/models/payments-paginated-response.ts +52 -0
- package/src/lib/Apis/models/pick-type-class.ts +51 -0
- package/src/lib/Apis/models/populated-chat-dto.ts +95 -0
- package/src/lib/Apis/models/populated-discount.ts +246 -0
- package/src/lib/Apis/models/populated-order.ts +209 -0
- package/src/lib/Apis/models/prefered-pick-or-delivery-time-dto.ts +33 -0
- package/src/lib/Apis/models/price-range.ts +33 -0
- package/src/lib/Apis/models/product-attribute.ts +57 -0
- package/src/lib/Apis/models/product-variant.ts +167 -0
- package/src/lib/Apis/models/product.ts +136 -0
- package/src/lib/Apis/models/products-insights-dto.ts +45 -0
- package/src/lib/Apis/models/rate-dto.ts +123 -0
- package/src/lib/Apis/models/refill-request-dto.ts +75 -0
- package/src/lib/Apis/models/refill-request.ts +105 -0
- package/src/lib/Apis/models/register-or-login-with-gmail.ts +27 -0
- package/src/lib/Apis/models/reserve-appointment.ts +261 -0
- package/src/lib/Apis/models/review.ts +93 -0
- package/src/lib/Apis/models/role.ts +69 -0
- package/src/lib/Apis/models/schedule-campaign-draft-dto.ts +27 -0
- package/src/lib/Apis/models/send-test-email-dto.ts +28 -0
- package/src/lib/Apis/models/shallow-parent-category-dto.ts +33 -0
- package/src/lib/Apis/models/shipment-details-dto.ts +88 -0
- package/src/lib/Apis/models/shipment-status-dto.ts +117 -0
- package/src/lib/Apis/models/shipment-with-order.ts +105 -0
- package/src/lib/Apis/models/shipment.ts +104 -0
- package/src/lib/Apis/models/shipping-info.ts +88 -0
- package/src/lib/Apis/models/single-browser-stats-dto.ts +45 -0
- package/src/lib/Apis/models/single-contact-aggregated-stats-dto.ts +129 -0
- package/src/lib/Apis/models/single-contact-list-stats-dto.ts +117 -0
- package/src/lib/Apis/models/single-country-stats-dto.ts +39 -0
- package/src/lib/Apis/models/single-general-stats.ts +153 -0
- package/src/lib/Apis/models/single-link-stats-dto.ts +39 -0
- package/src/lib/Apis/models/single-message-populated.ts +59 -0
- package/src/lib/Apis/models/single-notification-dto.ts +99 -0
- package/src/lib/Apis/models/single-product-media.ts +74 -0
- package/src/lib/Apis/models/single-recipient-dto.ts +33 -0
- package/src/lib/Apis/models/single-suggest-attribute.ts +33 -0
- package/src/lib/Apis/models/statistic-dto.ts +171 -0
- package/src/lib/Apis/models/store-entity.ts +117 -0
- package/src/lib/Apis/models/store.ts +135 -0
- package/src/lib/Apis/models/sub-category-headlines-only-response-dto.ts +39 -0
- package/src/lib/Apis/models/sub-category.ts +93 -0
- package/src/lib/Apis/models/suggest-attributes.ts +28 -0
- package/src/lib/Apis/models/suggested-slot.ts +33 -0
- package/src/lib/Apis/models/table-cell-dto.ts +33 -0
- package/src/lib/Apis/models/table-dto.ts +34 -0
- package/src/lib/Apis/models/tadmin-session-data.ts +47 -0
- package/src/lib/Apis/models/track-dto.ts +94 -0
- package/src/lib/Apis/models/tracking-status-location-base.ts +45 -0
- package/src/lib/Apis/models/tracking-status-substatus.ts +39 -0
- package/src/lib/Apis/models/tracking-status.ts +71 -0
- package/src/lib/Apis/models/transfere-patient-request.ts +123 -0
- package/src/lib/Apis/models/transfere-patients-request-dto.ts +99 -0
- package/src/lib/Apis/models/tuser-session-data.ts +34 -0
- package/src/lib/Apis/models/update-address-dto.ts +134 -0
- package/src/lib/Apis/models/update-blog-dto.ts +45 -0
- package/src/lib/Apis/models/update-campaign-draft-content-dto.ts +27 -0
- package/src/lib/Apis/models/update-category-dto.ts +45 -0
- package/src/lib/Apis/models/update-discount-dto.ts +208 -0
- package/src/lib/Apis/models/update-event-dto.ts +52 -0
- package/src/lib/Apis/models/update-items-order-dto.ts +27 -0
- package/src/lib/Apis/models/update-marketing-camp-draft-dto.ts +81 -0
- package/src/lib/Apis/models/update-message-dto.ts +57 -0
- package/src/lib/Apis/models/update-product-attribute-dto.ts +33 -0
- package/src/lib/Apis/models/update-product-dto.ts +96 -0
- package/src/lib/Apis/models/update-product-variant-dto.ts +119 -0
- package/src/lib/Apis/models/update-refill-request-dto.ts +75 -0
- package/src/lib/Apis/models/update-review-dto.ts +63 -0
- package/src/lib/Apis/models/update-role-dto.ts +57 -0
- package/src/lib/Apis/models/update-store-dto.ts +105 -0
- package/src/lib/Apis/models/update-sub-category-dto.ts +45 -0
- package/src/lib/Apis/models/update-transfere-patients-request-dto.ts +99 -0
- package/src/lib/Apis/models/update-user-dto.ts +239 -0
- package/src/lib/Apis/models/update-user-group-dto.ts +39 -0
- package/src/lib/Apis/models/update-zone-dto.ts +82 -0
- package/src/lib/Apis/models/upload-pdf-body.ts +27 -0
- package/src/lib/Apis/models/used-by.ts +87 -0
- package/src/lib/Apis/models/user-entity.ts +220 -0
- package/src/lib/Apis/models/user-group.ts +75 -0
- package/src/lib/Apis/models/user-insights-dto.ts +39 -0
- package/src/lib/Apis/models/user-with-no-id.ts +226 -0
- package/src/lib/Apis/models/user.ts +232 -0
- package/src/lib/Apis/models/users-paginated-response.ts +52 -0
- package/src/lib/Apis/models/verify-email-dto.ts +33 -0
- package/src/lib/Apis/models/zone-single-size.ts +51 -0
- package/src/lib/Apis/models/zone.ts +106 -0
- package/src/lib/Apis/wrapper.ts +37 -0
- package/src/lib/api/auth.ts +81 -0
- package/src/lib/api/cart.ts +42 -0
- package/src/lib/api/client.ts +118 -0
- package/src/lib/api/orders.ts +53 -0
- package/src/lib/api/products.ts +51 -0
- package/src/lib/api-adapter/auth-adapter.ts +196 -0
- package/src/lib/api-adapter/cart-adapter.ts +193 -0
- package/src/lib/api-adapter/config.ts +76 -0
- package/src/lib/api-adapter/index.ts +13 -0
- package/src/lib/api-adapter/mappers.ts +147 -0
- package/src/lib/api-adapter/orders-adapter.ts +195 -0
- package/src/lib/api-adapter/products-adapter.ts +194 -0
- package/src/lib/types/index.ts +152 -0
- package/src/lib/utils/colors.ts +51 -0
- package/src/lib/utils/format.ts +48 -0
- package/src/providers/AuthProvider.tsx +117 -0
- package/src/providers/CartProvider.tsx +131 -0
- package/src/providers/EcommerceProvider.tsx +34 -0
- package/src/providers/ThemeProvider.tsx +57 -0
- package/src/screens/CartScreen.tsx +140 -0
- package/src/screens/CheckoutScreen.tsx +340 -0
- package/src/screens/CurrentOrdersScreen.tsx +85 -0
- package/src/screens/LoginScreen.tsx +149 -0
- package/src/screens/OrdersScreen.tsx +86 -0
- package/src/screens/ProductDetailScreen.tsx +255 -0
- package/src/screens/ProfileScreen.tsx +211 -0
- package/src/screens/RegisterScreen.tsx +200 -0
- package/src/screens/ShopScreen.tsx +233 -0
- package/src/styles/globals.css +51 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Hey Pharamcist API
|
|
5
|
+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
15
|
+
import { Configuration } from '../configuration';
|
|
16
|
+
// Some imports not used depending on template conditions
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
|
+
import { ContactUs } from '../models';
|
|
20
|
+
import { CreateMessageDto } from '../models';
|
|
21
|
+
import { UpdateMessageDto } from '../models';
|
|
22
|
+
/**
|
|
23
|
+
* ContactUsApi - axios parameter creator
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export const ContactUsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
27
|
+
return {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @summary Create a new message from contact us form
|
|
31
|
+
* @param {CreateMessageDto} body
|
|
32
|
+
* @param {*} [options] Override http request option.
|
|
33
|
+
* @throws {RequiredError}
|
|
34
|
+
*/
|
|
35
|
+
createMessage: async (body: CreateMessageDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
36
|
+
// verify required parameter 'body' is not null or undefined
|
|
37
|
+
if (body === null || body === undefined) {
|
|
38
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling createMessage.');
|
|
39
|
+
}
|
|
40
|
+
const localVarPath = `/contact-us`;
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
48
|
+
const localVarHeaderParameter = {} as any;
|
|
49
|
+
const localVarQueryParameter = {} as any;
|
|
50
|
+
|
|
51
|
+
// authentication x-store-key required
|
|
52
|
+
if (configuration && configuration.apiKey) {
|
|
53
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
54
|
+
? await configuration.apiKey("x-store-key")
|
|
55
|
+
: await configuration.apiKey;
|
|
56
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
60
|
+
|
|
61
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
62
|
+
for (const key in localVarQueryParameter) {
|
|
63
|
+
query.set(key, localVarQueryParameter[key]);
|
|
64
|
+
}
|
|
65
|
+
for (const key in options.params) {
|
|
66
|
+
query.set(key, options.params[key]);
|
|
67
|
+
}
|
|
68
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
69
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
70
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
71
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
72
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
76
|
+
options: localVarRequestOptions,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @summary Delete a message from contact us form
|
|
82
|
+
* @param {string} id
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
deleteContactUsMessagea: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
87
|
+
// verify required parameter 'id' is not null or undefined
|
|
88
|
+
if (id === null || id === undefined) {
|
|
89
|
+
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteContactUsMessagea.');
|
|
90
|
+
}
|
|
91
|
+
const localVarPath = `/contact-us/{id}`
|
|
92
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
93
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
94
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
95
|
+
let baseOptions;
|
|
96
|
+
if (configuration) {
|
|
97
|
+
baseOptions = configuration.baseOptions;
|
|
98
|
+
}
|
|
99
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
100
|
+
const localVarHeaderParameter = {} as any;
|
|
101
|
+
const localVarQueryParameter = {} as any;
|
|
102
|
+
|
|
103
|
+
// authentication x-store-key required
|
|
104
|
+
if (configuration && configuration.apiKey) {
|
|
105
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
106
|
+
? await configuration.apiKey("x-store-key")
|
|
107
|
+
: await configuration.apiKey;
|
|
108
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
112
|
+
for (const key in localVarQueryParameter) {
|
|
113
|
+
query.set(key, localVarQueryParameter[key]);
|
|
114
|
+
}
|
|
115
|
+
for (const key in options.params) {
|
|
116
|
+
query.set(key, options.params[key]);
|
|
117
|
+
}
|
|
118
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
120
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
124
|
+
options: localVarRequestOptions,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @summary Get all messages from contact us form for the store
|
|
130
|
+
* @param {*} [options] Override http request option.
|
|
131
|
+
* @throws {RequiredError}
|
|
132
|
+
*/
|
|
133
|
+
getAllMessages: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
134
|
+
const localVarPath = `/contact-us`;
|
|
135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
136
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
137
|
+
let baseOptions;
|
|
138
|
+
if (configuration) {
|
|
139
|
+
baseOptions = configuration.baseOptions;
|
|
140
|
+
}
|
|
141
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
142
|
+
const localVarHeaderParameter = {} as any;
|
|
143
|
+
const localVarQueryParameter = {} as any;
|
|
144
|
+
|
|
145
|
+
// authentication x-store-key required
|
|
146
|
+
if (configuration && configuration.apiKey) {
|
|
147
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
148
|
+
? await configuration.apiKey("x-store-key")
|
|
149
|
+
: await configuration.apiKey;
|
|
150
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
154
|
+
for (const key in localVarQueryParameter) {
|
|
155
|
+
query.set(key, localVarQueryParameter[key]);
|
|
156
|
+
}
|
|
157
|
+
for (const key in options.params) {
|
|
158
|
+
query.set(key, options.params[key]);
|
|
159
|
+
}
|
|
160
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
161
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
162
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
166
|
+
options: localVarRequestOptions,
|
|
167
|
+
};
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @summary Update a message from contact us form
|
|
172
|
+
* @param {UpdateMessageDto} body
|
|
173
|
+
* @param {string} id
|
|
174
|
+
* @param {*} [options] Override http request option.
|
|
175
|
+
* @throws {RequiredError}
|
|
176
|
+
*/
|
|
177
|
+
updateMessage: async (body: UpdateMessageDto, id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
178
|
+
// verify required parameter 'body' is not null or undefined
|
|
179
|
+
if (body === null || body === undefined) {
|
|
180
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling updateMessage.');
|
|
181
|
+
}
|
|
182
|
+
// verify required parameter 'id' is not null or undefined
|
|
183
|
+
if (id === null || id === undefined) {
|
|
184
|
+
throw new RequiredError('id','Required parameter id was null or undefined when calling updateMessage.');
|
|
185
|
+
}
|
|
186
|
+
const localVarPath = `/contact-us/{id}`
|
|
187
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
188
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
189
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
190
|
+
let baseOptions;
|
|
191
|
+
if (configuration) {
|
|
192
|
+
baseOptions = configuration.baseOptions;
|
|
193
|
+
}
|
|
194
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
|
|
195
|
+
const localVarHeaderParameter = {} as any;
|
|
196
|
+
const localVarQueryParameter = {} as any;
|
|
197
|
+
|
|
198
|
+
// authentication x-store-key required
|
|
199
|
+
if (configuration && configuration.apiKey) {
|
|
200
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
201
|
+
? await configuration.apiKey("x-store-key")
|
|
202
|
+
: await configuration.apiKey;
|
|
203
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
207
|
+
|
|
208
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
209
|
+
for (const key in localVarQueryParameter) {
|
|
210
|
+
query.set(key, localVarQueryParameter[key]);
|
|
211
|
+
}
|
|
212
|
+
for (const key in options.params) {
|
|
213
|
+
query.set(key, options.params[key]);
|
|
214
|
+
}
|
|
215
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
216
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
217
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
218
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
219
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
220
|
+
|
|
221
|
+
return {
|
|
222
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
223
|
+
options: localVarRequestOptions,
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* ContactUsApi - functional programming interface
|
|
231
|
+
* @export
|
|
232
|
+
*/
|
|
233
|
+
export const ContactUsApiFp = function(configuration?: Configuration) {
|
|
234
|
+
return {
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
* @summary Create a new message from contact us form
|
|
238
|
+
* @param {CreateMessageDto} body
|
|
239
|
+
* @param {*} [options] Override http request option.
|
|
240
|
+
* @throws {RequiredError}
|
|
241
|
+
*/
|
|
242
|
+
async createMessage(body: CreateMessageDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactUs>>> {
|
|
243
|
+
const localVarAxiosArgs = await ContactUsApiAxiosParamCreator(configuration).createMessage(body, options);
|
|
244
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
245
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
246
|
+
return axios.request(axiosRequestArgs);
|
|
247
|
+
};
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
*
|
|
251
|
+
* @summary Delete a message from contact us form
|
|
252
|
+
* @param {string} id
|
|
253
|
+
* @param {*} [options] Override http request option.
|
|
254
|
+
* @throws {RequiredError}
|
|
255
|
+
*/
|
|
256
|
+
async deleteContactUsMessagea(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
257
|
+
const localVarAxiosArgs = await ContactUsApiAxiosParamCreator(configuration).deleteContactUsMessagea(id, options);
|
|
258
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
259
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
260
|
+
return axios.request(axiosRequestArgs);
|
|
261
|
+
};
|
|
262
|
+
},
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @summary Get all messages from contact us form for the store
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
async getAllMessages(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<ContactUs>>>> {
|
|
270
|
+
const localVarAxiosArgs = await ContactUsApiAxiosParamCreator(configuration).getAllMessages(options);
|
|
271
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
272
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
273
|
+
return axios.request(axiosRequestArgs);
|
|
274
|
+
};
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @summary Update a message from contact us form
|
|
279
|
+
* @param {UpdateMessageDto} body
|
|
280
|
+
* @param {string} id
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
async updateMessage(body: UpdateMessageDto, id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ContactUs>>> {
|
|
285
|
+
const localVarAxiosArgs = await ContactUsApiAxiosParamCreator(configuration).updateMessage(body, id, options);
|
|
286
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
287
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
288
|
+
return axios.request(axiosRequestArgs);
|
|
289
|
+
};
|
|
290
|
+
},
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* ContactUsApi - factory interface
|
|
296
|
+
* @export
|
|
297
|
+
*/
|
|
298
|
+
export const ContactUsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
299
|
+
return {
|
|
300
|
+
/**
|
|
301
|
+
*
|
|
302
|
+
* @summary Create a new message from contact us form
|
|
303
|
+
* @param {CreateMessageDto} body
|
|
304
|
+
* @param {*} [options] Override http request option.
|
|
305
|
+
* @throws {RequiredError}
|
|
306
|
+
*/
|
|
307
|
+
async createMessage(body: CreateMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactUs>> {
|
|
308
|
+
return ContactUsApiFp(configuration).createMessage(body, options).then((request) => request(axios, basePath));
|
|
309
|
+
},
|
|
310
|
+
/**
|
|
311
|
+
*
|
|
312
|
+
* @summary Delete a message from contact us form
|
|
313
|
+
* @param {string} id
|
|
314
|
+
* @param {*} [options] Override http request option.
|
|
315
|
+
* @throws {RequiredError}
|
|
316
|
+
*/
|
|
317
|
+
async deleteContactUsMessagea(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
318
|
+
return ContactUsApiFp(configuration).deleteContactUsMessagea(id, options).then((request) => request(axios, basePath));
|
|
319
|
+
},
|
|
320
|
+
/**
|
|
321
|
+
*
|
|
322
|
+
* @summary Get all messages from contact us form for the store
|
|
323
|
+
* @param {*} [options] Override http request option.
|
|
324
|
+
* @throws {RequiredError}
|
|
325
|
+
*/
|
|
326
|
+
async getAllMessages(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ContactUs>>> {
|
|
327
|
+
return ContactUsApiFp(configuration).getAllMessages(options).then((request) => request(axios, basePath));
|
|
328
|
+
},
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
* @summary Update a message from contact us form
|
|
332
|
+
* @param {UpdateMessageDto} body
|
|
333
|
+
* @param {string} id
|
|
334
|
+
* @param {*} [options] Override http request option.
|
|
335
|
+
* @throws {RequiredError}
|
|
336
|
+
*/
|
|
337
|
+
async updateMessage(body: UpdateMessageDto, id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ContactUs>> {
|
|
338
|
+
return ContactUsApiFp(configuration).updateMessage(body, id, options).then((request) => request(axios, basePath));
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* ContactUsApi - object-oriented interface
|
|
345
|
+
* @export
|
|
346
|
+
* @class ContactUsApi
|
|
347
|
+
* @extends {BaseAPI}
|
|
348
|
+
*/
|
|
349
|
+
export class ContactUsApi extends BaseAPI {
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* @summary Create a new message from contact us form
|
|
353
|
+
* @param {CreateMessageDto} body
|
|
354
|
+
* @param {*} [options] Override http request option.
|
|
355
|
+
* @throws {RequiredError}
|
|
356
|
+
* @memberof ContactUsApi
|
|
357
|
+
*/
|
|
358
|
+
public async createMessage(body: CreateMessageDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ContactUs>> {
|
|
359
|
+
return ContactUsApiFp(this.configuration).createMessage(body, options).then((request) => request(this.axios, this.basePath));
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
*
|
|
363
|
+
* @summary Delete a message from contact us form
|
|
364
|
+
* @param {string} id
|
|
365
|
+
* @param {*} [options] Override http request option.
|
|
366
|
+
* @throws {RequiredError}
|
|
367
|
+
* @memberof ContactUsApi
|
|
368
|
+
*/
|
|
369
|
+
public async deleteContactUsMessagea(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
370
|
+
return ContactUsApiFp(this.configuration).deleteContactUsMessagea(id, options).then((request) => request(this.axios, this.basePath));
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
*
|
|
374
|
+
* @summary Get all messages from contact us form for the store
|
|
375
|
+
* @param {*} [options] Override http request option.
|
|
376
|
+
* @throws {RequiredError}
|
|
377
|
+
* @memberof ContactUsApi
|
|
378
|
+
*/
|
|
379
|
+
public async getAllMessages(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<ContactUs>>> {
|
|
380
|
+
return ContactUsApiFp(this.configuration).getAllMessages(options).then((request) => request(this.axios, this.basePath));
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
*
|
|
384
|
+
* @summary Update a message from contact us form
|
|
385
|
+
* @param {UpdateMessageDto} body
|
|
386
|
+
* @param {string} id
|
|
387
|
+
* @param {*} [options] Override http request option.
|
|
388
|
+
* @throws {RequiredError}
|
|
389
|
+
* @memberof ContactUsApi
|
|
390
|
+
*/
|
|
391
|
+
public async updateMessage(body: UpdateMessageDto, id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ContactUs>> {
|
|
392
|
+
return ContactUsApiFp(this.configuration).updateMessage(body, id, options).then((request) => request(this.axios, this.basePath));
|
|
393
|
+
}
|
|
394
|
+
}
|