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,1461 @@
|
|
|
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 { Address } from '../models';
|
|
20
|
+
import { CreateAddressDto } from '../models';
|
|
21
|
+
import { CreateStoreAddressDto } from '../models';
|
|
22
|
+
import { UpdateAddressDto } from '../models';
|
|
23
|
+
/**
|
|
24
|
+
* AddressesApi - axios parameter creator
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const AddressesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
28
|
+
return {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @summary Create address for user
|
|
32
|
+
* @param {CreateAddressDto} body
|
|
33
|
+
* @param {string} userId
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
adminCreateAddressForUser: async (body: CreateAddressDto, userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
|
+
// verify required parameter 'body' is not null or undefined
|
|
39
|
+
if (body === null || body === undefined) {
|
|
40
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling adminCreateAddressForUser.');
|
|
41
|
+
}
|
|
42
|
+
// verify required parameter 'userId' is not null or undefined
|
|
43
|
+
if (userId === null || userId === undefined) {
|
|
44
|
+
throw new RequiredError('userId','Required parameter userId was null or undefined when calling adminCreateAddressForUser.');
|
|
45
|
+
}
|
|
46
|
+
const localVarPath = `/addresses/create-by-admin/{userId}`
|
|
47
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
48
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
50
|
+
let baseOptions;
|
|
51
|
+
if (configuration) {
|
|
52
|
+
baseOptions = configuration.baseOptions;
|
|
53
|
+
}
|
|
54
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
55
|
+
const localVarHeaderParameter = {} as any;
|
|
56
|
+
const localVarQueryParameter = {} as any;
|
|
57
|
+
|
|
58
|
+
// authentication bearer required
|
|
59
|
+
// http bearer authentication required
|
|
60
|
+
if (configuration && configuration.accessToken) {
|
|
61
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
62
|
+
? await configuration.accessToken()
|
|
63
|
+
: await configuration.accessToken;
|
|
64
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// authentication x-store-key required
|
|
68
|
+
if (configuration && configuration.apiKey) {
|
|
69
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
70
|
+
? await configuration.apiKey("x-store-key")
|
|
71
|
+
: await configuration.apiKey;
|
|
72
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
76
|
+
|
|
77
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
78
|
+
for (const key in localVarQueryParameter) {
|
|
79
|
+
query.set(key, localVarQueryParameter[key]);
|
|
80
|
+
}
|
|
81
|
+
for (const key in options.params) {
|
|
82
|
+
query.set(key, options.params[key]);
|
|
83
|
+
}
|
|
84
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
85
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
86
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
87
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
88
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
92
|
+
options: localVarRequestOptions,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @summary Delete address
|
|
98
|
+
* @param {string} addressId
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
*/
|
|
102
|
+
adminDeleteUserAddress: async (addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
103
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
104
|
+
if (addressId === null || addressId === undefined) {
|
|
105
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling adminDeleteUserAddress.');
|
|
106
|
+
}
|
|
107
|
+
const localVarPath = `/addresses/delete-by-admin/{addressId}`
|
|
108
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
109
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
110
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
111
|
+
let baseOptions;
|
|
112
|
+
if (configuration) {
|
|
113
|
+
baseOptions = configuration.baseOptions;
|
|
114
|
+
}
|
|
115
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
116
|
+
const localVarHeaderParameter = {} as any;
|
|
117
|
+
const localVarQueryParameter = {} as any;
|
|
118
|
+
|
|
119
|
+
// authentication bearer required
|
|
120
|
+
// http bearer authentication required
|
|
121
|
+
if (configuration && configuration.accessToken) {
|
|
122
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
123
|
+
? await configuration.accessToken()
|
|
124
|
+
: await configuration.accessToken;
|
|
125
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// authentication x-store-key required
|
|
129
|
+
if (configuration && configuration.apiKey) {
|
|
130
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
131
|
+
? await configuration.apiKey("x-store-key")
|
|
132
|
+
: await configuration.apiKey;
|
|
133
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
137
|
+
for (const key in localVarQueryParameter) {
|
|
138
|
+
query.set(key, localVarQueryParameter[key]);
|
|
139
|
+
}
|
|
140
|
+
for (const key in options.params) {
|
|
141
|
+
query.set(key, options.params[key]);
|
|
142
|
+
}
|
|
143
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
144
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
145
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
149
|
+
options: localVarRequestOptions,
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @summary Get all addresses for user
|
|
155
|
+
* @param {string} userId
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
adminGetSingleUserAddresses: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
160
|
+
// verify required parameter 'userId' is not null or undefined
|
|
161
|
+
if (userId === null || userId === undefined) {
|
|
162
|
+
throw new RequiredError('userId','Required parameter userId was null or undefined when calling adminGetSingleUserAddresses.');
|
|
163
|
+
}
|
|
164
|
+
const localVarPath = `/addresses/getSingleUserAddresses/{userId}`
|
|
165
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
166
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
167
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
168
|
+
let baseOptions;
|
|
169
|
+
if (configuration) {
|
|
170
|
+
baseOptions = configuration.baseOptions;
|
|
171
|
+
}
|
|
172
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
173
|
+
const localVarHeaderParameter = {} as any;
|
|
174
|
+
const localVarQueryParameter = {} as any;
|
|
175
|
+
|
|
176
|
+
// authentication bearer required
|
|
177
|
+
// http bearer authentication required
|
|
178
|
+
if (configuration && configuration.accessToken) {
|
|
179
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
180
|
+
? await configuration.accessToken()
|
|
181
|
+
: await configuration.accessToken;
|
|
182
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// authentication x-store-key required
|
|
186
|
+
if (configuration && configuration.apiKey) {
|
|
187
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
188
|
+
? await configuration.apiKey("x-store-key")
|
|
189
|
+
: await configuration.apiKey;
|
|
190
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
194
|
+
for (const key in localVarQueryParameter) {
|
|
195
|
+
query.set(key, localVarQueryParameter[key]);
|
|
196
|
+
}
|
|
197
|
+
for (const key in options.params) {
|
|
198
|
+
query.set(key, options.params[key]);
|
|
199
|
+
}
|
|
200
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
201
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
202
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
203
|
+
|
|
204
|
+
return {
|
|
205
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
206
|
+
options: localVarRequestOptions,
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @summary Update address
|
|
212
|
+
* @param {UpdateAddressDto} body
|
|
213
|
+
* @param {string} addressId
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
adminUpdateUserAddress: async (body: UpdateAddressDto, addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
218
|
+
// verify required parameter 'body' is not null or undefined
|
|
219
|
+
if (body === null || body === undefined) {
|
|
220
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling adminUpdateUserAddress.');
|
|
221
|
+
}
|
|
222
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
223
|
+
if (addressId === null || addressId === undefined) {
|
|
224
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling adminUpdateUserAddress.');
|
|
225
|
+
}
|
|
226
|
+
const localVarPath = `/addresses/update-by-admin/{addressId}`
|
|
227
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
228
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
229
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
230
|
+
let baseOptions;
|
|
231
|
+
if (configuration) {
|
|
232
|
+
baseOptions = configuration.baseOptions;
|
|
233
|
+
}
|
|
234
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
|
|
235
|
+
const localVarHeaderParameter = {} as any;
|
|
236
|
+
const localVarQueryParameter = {} as any;
|
|
237
|
+
|
|
238
|
+
// authentication bearer required
|
|
239
|
+
// http bearer authentication required
|
|
240
|
+
if (configuration && configuration.accessToken) {
|
|
241
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
242
|
+
? await configuration.accessToken()
|
|
243
|
+
: await configuration.accessToken;
|
|
244
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// authentication x-store-key required
|
|
248
|
+
if (configuration && configuration.apiKey) {
|
|
249
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
250
|
+
? await configuration.apiKey("x-store-key")
|
|
251
|
+
: await configuration.apiKey;
|
|
252
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
256
|
+
|
|
257
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
258
|
+
for (const key in localVarQueryParameter) {
|
|
259
|
+
query.set(key, localVarQueryParameter[key]);
|
|
260
|
+
}
|
|
261
|
+
for (const key in options.params) {
|
|
262
|
+
query.set(key, options.params[key]);
|
|
263
|
+
}
|
|
264
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
265
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
266
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
267
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
268
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
269
|
+
|
|
270
|
+
return {
|
|
271
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
272
|
+
options: localVarRequestOptions,
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
* @summary Create address for store
|
|
278
|
+
* @param {CreateStoreAddressDto} body
|
|
279
|
+
* @param {*} [options] Override http request option.
|
|
280
|
+
* @throws {RequiredError}
|
|
281
|
+
*/
|
|
282
|
+
createAddressForStore: async (body: CreateStoreAddressDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
283
|
+
// verify required parameter 'body' is not null or undefined
|
|
284
|
+
if (body === null || body === undefined) {
|
|
285
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling createAddressForStore.');
|
|
286
|
+
}
|
|
287
|
+
const localVarPath = `/addresses/store`;
|
|
288
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
289
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
290
|
+
let baseOptions;
|
|
291
|
+
if (configuration) {
|
|
292
|
+
baseOptions = configuration.baseOptions;
|
|
293
|
+
}
|
|
294
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
295
|
+
const localVarHeaderParameter = {} as any;
|
|
296
|
+
const localVarQueryParameter = {} as any;
|
|
297
|
+
|
|
298
|
+
// authentication bearer required
|
|
299
|
+
// http bearer authentication required
|
|
300
|
+
if (configuration && configuration.accessToken) {
|
|
301
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
302
|
+
? await configuration.accessToken()
|
|
303
|
+
: await configuration.accessToken;
|
|
304
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// authentication x-store-key required
|
|
308
|
+
if (configuration && configuration.apiKey) {
|
|
309
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
310
|
+
? await configuration.apiKey("x-store-key")
|
|
311
|
+
: await configuration.apiKey;
|
|
312
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
316
|
+
|
|
317
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
318
|
+
for (const key in localVarQueryParameter) {
|
|
319
|
+
query.set(key, localVarQueryParameter[key]);
|
|
320
|
+
}
|
|
321
|
+
for (const key in options.params) {
|
|
322
|
+
query.set(key, options.params[key]);
|
|
323
|
+
}
|
|
324
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
325
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
326
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
327
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
328
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
329
|
+
|
|
330
|
+
return {
|
|
331
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
332
|
+
options: localVarRequestOptions,
|
|
333
|
+
};
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
*
|
|
337
|
+
* @summary Create address for user
|
|
338
|
+
* @param {CreateAddressDto} body
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
createAddressForUser: async (body: CreateAddressDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
343
|
+
// verify required parameter 'body' is not null or undefined
|
|
344
|
+
if (body === null || body === undefined) {
|
|
345
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling createAddressForUser.');
|
|
346
|
+
}
|
|
347
|
+
const localVarPath = `/addresses`;
|
|
348
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
349
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
350
|
+
let baseOptions;
|
|
351
|
+
if (configuration) {
|
|
352
|
+
baseOptions = configuration.baseOptions;
|
|
353
|
+
}
|
|
354
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
355
|
+
const localVarHeaderParameter = {} as any;
|
|
356
|
+
const localVarQueryParameter = {} as any;
|
|
357
|
+
|
|
358
|
+
// authentication bearer required
|
|
359
|
+
// http bearer authentication required
|
|
360
|
+
if (configuration && configuration.accessToken) {
|
|
361
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
362
|
+
? await configuration.accessToken()
|
|
363
|
+
: await configuration.accessToken;
|
|
364
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// authentication x-store-key required
|
|
368
|
+
if (configuration && configuration.apiKey) {
|
|
369
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
370
|
+
? await configuration.apiKey("x-store-key")
|
|
371
|
+
: await configuration.apiKey;
|
|
372
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
376
|
+
|
|
377
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
378
|
+
for (const key in localVarQueryParameter) {
|
|
379
|
+
query.set(key, localVarQueryParameter[key]);
|
|
380
|
+
}
|
|
381
|
+
for (const key in options.params) {
|
|
382
|
+
query.set(key, options.params[key]);
|
|
383
|
+
}
|
|
384
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
385
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
386
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
387
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
388
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
389
|
+
|
|
390
|
+
return {
|
|
391
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
392
|
+
options: localVarRequestOptions,
|
|
393
|
+
};
|
|
394
|
+
},
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @summary Delete address
|
|
398
|
+
* @param {string} addressId
|
|
399
|
+
* @param {*} [options] Override http request option.
|
|
400
|
+
* @throws {RequiredError}
|
|
401
|
+
*/
|
|
402
|
+
deleteUserAddress: async (addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
403
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
404
|
+
if (addressId === null || addressId === undefined) {
|
|
405
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling deleteUserAddress.');
|
|
406
|
+
}
|
|
407
|
+
const localVarPath = `/addresses/{addressId}`
|
|
408
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
409
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
410
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
411
|
+
let baseOptions;
|
|
412
|
+
if (configuration) {
|
|
413
|
+
baseOptions = configuration.baseOptions;
|
|
414
|
+
}
|
|
415
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
416
|
+
const localVarHeaderParameter = {} as any;
|
|
417
|
+
const localVarQueryParameter = {} as any;
|
|
418
|
+
|
|
419
|
+
// authentication bearer required
|
|
420
|
+
// http bearer authentication required
|
|
421
|
+
if (configuration && configuration.accessToken) {
|
|
422
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
423
|
+
? await configuration.accessToken()
|
|
424
|
+
: await configuration.accessToken;
|
|
425
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// authentication x-store-key required
|
|
429
|
+
if (configuration && configuration.apiKey) {
|
|
430
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
431
|
+
? await configuration.apiKey("x-store-key")
|
|
432
|
+
: await configuration.apiKey;
|
|
433
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
437
|
+
for (const key in localVarQueryParameter) {
|
|
438
|
+
query.set(key, localVarQueryParameter[key]);
|
|
439
|
+
}
|
|
440
|
+
for (const key in options.params) {
|
|
441
|
+
query.set(key, options.params[key]);
|
|
442
|
+
}
|
|
443
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
444
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
445
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
446
|
+
|
|
447
|
+
return {
|
|
448
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
449
|
+
options: localVarRequestOptions,
|
|
450
|
+
};
|
|
451
|
+
},
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* @summary Get all addresses for store
|
|
455
|
+
* @param {string} storeId
|
|
456
|
+
* @param {*} [options] Override http request option.
|
|
457
|
+
* @throws {RequiredError}
|
|
458
|
+
*/
|
|
459
|
+
getAllStoreAddresses: async (storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
460
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
461
|
+
if (storeId === null || storeId === undefined) {
|
|
462
|
+
throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling getAllStoreAddresses.');
|
|
463
|
+
}
|
|
464
|
+
const localVarPath = `/addresses/stores/{storeId}`
|
|
465
|
+
.replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
|
|
466
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
467
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
468
|
+
let baseOptions;
|
|
469
|
+
if (configuration) {
|
|
470
|
+
baseOptions = configuration.baseOptions;
|
|
471
|
+
}
|
|
472
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
473
|
+
const localVarHeaderParameter = {} as any;
|
|
474
|
+
const localVarQueryParameter = {} as any;
|
|
475
|
+
|
|
476
|
+
// authentication bearer required
|
|
477
|
+
// http bearer authentication required
|
|
478
|
+
if (configuration && configuration.accessToken) {
|
|
479
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
480
|
+
? await configuration.accessToken()
|
|
481
|
+
: await configuration.accessToken;
|
|
482
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// authentication x-store-key required
|
|
486
|
+
if (configuration && configuration.apiKey) {
|
|
487
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
488
|
+
? await configuration.apiKey("x-store-key")
|
|
489
|
+
: await configuration.apiKey;
|
|
490
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
494
|
+
for (const key in localVarQueryParameter) {
|
|
495
|
+
query.set(key, localVarQueryParameter[key]);
|
|
496
|
+
}
|
|
497
|
+
for (const key in options.params) {
|
|
498
|
+
query.set(key, options.params[key]);
|
|
499
|
+
}
|
|
500
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
501
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
502
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
503
|
+
|
|
504
|
+
return {
|
|
505
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
506
|
+
options: localVarRequestOptions,
|
|
507
|
+
};
|
|
508
|
+
},
|
|
509
|
+
/**
|
|
510
|
+
*
|
|
511
|
+
* @summary Get all addresses for user
|
|
512
|
+
* @param {*} [options] Override http request option.
|
|
513
|
+
* @throws {RequiredError}
|
|
514
|
+
*/
|
|
515
|
+
getAllUserAddresses: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
516
|
+
const localVarPath = `/addresses`;
|
|
517
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
518
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
519
|
+
let baseOptions;
|
|
520
|
+
if (configuration) {
|
|
521
|
+
baseOptions = configuration.baseOptions;
|
|
522
|
+
}
|
|
523
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
524
|
+
const localVarHeaderParameter = {} as any;
|
|
525
|
+
const localVarQueryParameter = {} as any;
|
|
526
|
+
|
|
527
|
+
// authentication bearer required
|
|
528
|
+
// http bearer authentication required
|
|
529
|
+
if (configuration && configuration.accessToken) {
|
|
530
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
531
|
+
? await configuration.accessToken()
|
|
532
|
+
: await configuration.accessToken;
|
|
533
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// authentication x-store-key required
|
|
537
|
+
if (configuration && configuration.apiKey) {
|
|
538
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
539
|
+
? await configuration.apiKey("x-store-key")
|
|
540
|
+
: await configuration.apiKey;
|
|
541
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
545
|
+
for (const key in localVarQueryParameter) {
|
|
546
|
+
query.set(key, localVarQueryParameter[key]);
|
|
547
|
+
}
|
|
548
|
+
for (const key in options.params) {
|
|
549
|
+
query.set(key, options.params[key]);
|
|
550
|
+
}
|
|
551
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
552
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
553
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
554
|
+
|
|
555
|
+
return {
|
|
556
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
557
|
+
options: localVarRequestOptions,
|
|
558
|
+
};
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
*
|
|
562
|
+
* @summary Get all addresses for user
|
|
563
|
+
* @param {*} [options] Override http request option.
|
|
564
|
+
* @throws {RequiredError}
|
|
565
|
+
*/
|
|
566
|
+
getMyAddresses: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
567
|
+
const localVarPath = `/addresses/mine`;
|
|
568
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
569
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
570
|
+
let baseOptions;
|
|
571
|
+
if (configuration) {
|
|
572
|
+
baseOptions = configuration.baseOptions;
|
|
573
|
+
}
|
|
574
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
575
|
+
const localVarHeaderParameter = {} as any;
|
|
576
|
+
const localVarQueryParameter = {} as any;
|
|
577
|
+
|
|
578
|
+
// authentication bearer required
|
|
579
|
+
// http bearer authentication required
|
|
580
|
+
if (configuration && configuration.accessToken) {
|
|
581
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
582
|
+
? await configuration.accessToken()
|
|
583
|
+
: await configuration.accessToken;
|
|
584
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// authentication x-store-key required
|
|
588
|
+
if (configuration && configuration.apiKey) {
|
|
589
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
590
|
+
? await configuration.apiKey("x-store-key")
|
|
591
|
+
: await configuration.apiKey;
|
|
592
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
596
|
+
for (const key in localVarQueryParameter) {
|
|
597
|
+
query.set(key, localVarQueryParameter[key]);
|
|
598
|
+
}
|
|
599
|
+
for (const key in options.params) {
|
|
600
|
+
query.set(key, options.params[key]);
|
|
601
|
+
}
|
|
602
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
603
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
604
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
605
|
+
|
|
606
|
+
return {
|
|
607
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
608
|
+
options: localVarRequestOptions,
|
|
609
|
+
};
|
|
610
|
+
},
|
|
611
|
+
/**
|
|
612
|
+
*
|
|
613
|
+
* @summary Get default address for user
|
|
614
|
+
* @param {*} [options] Override http request option.
|
|
615
|
+
* @throws {RequiredError}
|
|
616
|
+
*/
|
|
617
|
+
getMyDefaultAddress: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
618
|
+
const localVarPath = `/addresses/defaultAddress`;
|
|
619
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
620
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
621
|
+
let baseOptions;
|
|
622
|
+
if (configuration) {
|
|
623
|
+
baseOptions = configuration.baseOptions;
|
|
624
|
+
}
|
|
625
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
626
|
+
const localVarHeaderParameter = {} as any;
|
|
627
|
+
const localVarQueryParameter = {} as any;
|
|
628
|
+
|
|
629
|
+
// authentication bearer required
|
|
630
|
+
// http bearer authentication required
|
|
631
|
+
if (configuration && configuration.accessToken) {
|
|
632
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
633
|
+
? await configuration.accessToken()
|
|
634
|
+
: await configuration.accessToken;
|
|
635
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
// authentication x-store-key required
|
|
639
|
+
if (configuration && configuration.apiKey) {
|
|
640
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
641
|
+
? await configuration.apiKey("x-store-key")
|
|
642
|
+
: await configuration.apiKey;
|
|
643
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
647
|
+
for (const key in localVarQueryParameter) {
|
|
648
|
+
query.set(key, localVarQueryParameter[key]);
|
|
649
|
+
}
|
|
650
|
+
for (const key in options.params) {
|
|
651
|
+
query.set(key, options.params[key]);
|
|
652
|
+
}
|
|
653
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
654
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
655
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
656
|
+
|
|
657
|
+
return {
|
|
658
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
659
|
+
options: localVarRequestOptions,
|
|
660
|
+
};
|
|
661
|
+
},
|
|
662
|
+
/**
|
|
663
|
+
*
|
|
664
|
+
* @summary Get single address
|
|
665
|
+
* @param {string} addressId
|
|
666
|
+
* @param {*} [options] Override http request option.
|
|
667
|
+
* @throws {RequiredError}
|
|
668
|
+
*/
|
|
669
|
+
getSingleAddress: async (addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
670
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
671
|
+
if (addressId === null || addressId === undefined) {
|
|
672
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling getSingleAddress.');
|
|
673
|
+
}
|
|
674
|
+
const localVarPath = `/addresses/single/{addressId}`
|
|
675
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
676
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
677
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
678
|
+
let baseOptions;
|
|
679
|
+
if (configuration) {
|
|
680
|
+
baseOptions = configuration.baseOptions;
|
|
681
|
+
}
|
|
682
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
683
|
+
const localVarHeaderParameter = {} as any;
|
|
684
|
+
const localVarQueryParameter = {} as any;
|
|
685
|
+
|
|
686
|
+
// authentication bearer required
|
|
687
|
+
// http bearer authentication required
|
|
688
|
+
if (configuration && configuration.accessToken) {
|
|
689
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
690
|
+
? await configuration.accessToken()
|
|
691
|
+
: await configuration.accessToken;
|
|
692
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// authentication x-store-key required
|
|
696
|
+
if (configuration && configuration.apiKey) {
|
|
697
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
698
|
+
? await configuration.apiKey("x-store-key")
|
|
699
|
+
: await configuration.apiKey;
|
|
700
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
704
|
+
for (const key in localVarQueryParameter) {
|
|
705
|
+
query.set(key, localVarQueryParameter[key]);
|
|
706
|
+
}
|
|
707
|
+
for (const key in options.params) {
|
|
708
|
+
query.set(key, options.params[key]);
|
|
709
|
+
}
|
|
710
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
711
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
712
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
713
|
+
|
|
714
|
+
return {
|
|
715
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
716
|
+
options: localVarRequestOptions,
|
|
717
|
+
};
|
|
718
|
+
},
|
|
719
|
+
/**
|
|
720
|
+
*
|
|
721
|
+
* @summary Set new default shipping address
|
|
722
|
+
* @param {string} userId
|
|
723
|
+
* @param {string} addressId
|
|
724
|
+
* @param {*} [options] Override http request option.
|
|
725
|
+
* @throws {RequiredError}
|
|
726
|
+
*/
|
|
727
|
+
setDefaultShippingAddress: async (userId: string, addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
728
|
+
// verify required parameter 'userId' is not null or undefined
|
|
729
|
+
if (userId === null || userId === undefined) {
|
|
730
|
+
throw new RequiredError('userId','Required parameter userId was null or undefined when calling setDefaultShippingAddress.');
|
|
731
|
+
}
|
|
732
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
733
|
+
if (addressId === null || addressId === undefined) {
|
|
734
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling setDefaultShippingAddress.');
|
|
735
|
+
}
|
|
736
|
+
const localVarPath = `/addresses/user/{userId}/set-default-shipping/{addressId}`
|
|
737
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
|
|
738
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
739
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
740
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
741
|
+
let baseOptions;
|
|
742
|
+
if (configuration) {
|
|
743
|
+
baseOptions = configuration.baseOptions;
|
|
744
|
+
}
|
|
745
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
|
|
746
|
+
const localVarHeaderParameter = {} as any;
|
|
747
|
+
const localVarQueryParameter = {} as any;
|
|
748
|
+
|
|
749
|
+
// authentication bearer required
|
|
750
|
+
// http bearer authentication required
|
|
751
|
+
if (configuration && configuration.accessToken) {
|
|
752
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
753
|
+
? await configuration.accessToken()
|
|
754
|
+
: await configuration.accessToken;
|
|
755
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
// authentication x-store-key required
|
|
759
|
+
if (configuration && configuration.apiKey) {
|
|
760
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
761
|
+
? await configuration.apiKey("x-store-key")
|
|
762
|
+
: await configuration.apiKey;
|
|
763
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
767
|
+
for (const key in localVarQueryParameter) {
|
|
768
|
+
query.set(key, localVarQueryParameter[key]);
|
|
769
|
+
}
|
|
770
|
+
for (const key in options.params) {
|
|
771
|
+
query.set(key, options.params[key]);
|
|
772
|
+
}
|
|
773
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
774
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
775
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
776
|
+
|
|
777
|
+
return {
|
|
778
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
779
|
+
options: localVarRequestOptions,
|
|
780
|
+
};
|
|
781
|
+
},
|
|
782
|
+
/**
|
|
783
|
+
*
|
|
784
|
+
* @summary Update default address for user
|
|
785
|
+
* @param {string} addressId
|
|
786
|
+
* @param {*} [options] Override http request option.
|
|
787
|
+
* @throws {RequiredError}
|
|
788
|
+
*/
|
|
789
|
+
updateDefaultAddress: async (addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
790
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
791
|
+
if (addressId === null || addressId === undefined) {
|
|
792
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling updateDefaultAddress.');
|
|
793
|
+
}
|
|
794
|
+
const localVarPath = `/addresses/updateDefault/{addressId}`
|
|
795
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
796
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
797
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
798
|
+
let baseOptions;
|
|
799
|
+
if (configuration) {
|
|
800
|
+
baseOptions = configuration.baseOptions;
|
|
801
|
+
}
|
|
802
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
803
|
+
const localVarHeaderParameter = {} as any;
|
|
804
|
+
const localVarQueryParameter = {} as any;
|
|
805
|
+
|
|
806
|
+
// authentication bearer required
|
|
807
|
+
// http bearer authentication required
|
|
808
|
+
if (configuration && configuration.accessToken) {
|
|
809
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
810
|
+
? await configuration.accessToken()
|
|
811
|
+
: await configuration.accessToken;
|
|
812
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
// authentication x-store-key required
|
|
816
|
+
if (configuration && configuration.apiKey) {
|
|
817
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
818
|
+
? await configuration.apiKey("x-store-key")
|
|
819
|
+
: await configuration.apiKey;
|
|
820
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
824
|
+
for (const key in localVarQueryParameter) {
|
|
825
|
+
query.set(key, localVarQueryParameter[key]);
|
|
826
|
+
}
|
|
827
|
+
for (const key in options.params) {
|
|
828
|
+
query.set(key, options.params[key]);
|
|
829
|
+
}
|
|
830
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
831
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
832
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
833
|
+
|
|
834
|
+
return {
|
|
835
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
836
|
+
options: localVarRequestOptions,
|
|
837
|
+
};
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
* @summary Update address
|
|
842
|
+
* @param {UpdateAddressDto} body
|
|
843
|
+
* @param {string} addressId
|
|
844
|
+
* @param {*} [options] Override http request option.
|
|
845
|
+
* @throws {RequiredError}
|
|
846
|
+
*/
|
|
847
|
+
updateUserAddress: async (body: UpdateAddressDto, addressId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
848
|
+
// verify required parameter 'body' is not null or undefined
|
|
849
|
+
if (body === null || body === undefined) {
|
|
850
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling updateUserAddress.');
|
|
851
|
+
}
|
|
852
|
+
// verify required parameter 'addressId' is not null or undefined
|
|
853
|
+
if (addressId === null || addressId === undefined) {
|
|
854
|
+
throw new RequiredError('addressId','Required parameter addressId was null or undefined when calling updateUserAddress.');
|
|
855
|
+
}
|
|
856
|
+
const localVarPath = `/addresses/{addressId}`
|
|
857
|
+
.replace(`{${"addressId"}}`, encodeURIComponent(String(addressId)));
|
|
858
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
859
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
860
|
+
let baseOptions;
|
|
861
|
+
if (configuration) {
|
|
862
|
+
baseOptions = configuration.baseOptions;
|
|
863
|
+
}
|
|
864
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
|
|
865
|
+
const localVarHeaderParameter = {} as any;
|
|
866
|
+
const localVarQueryParameter = {} as any;
|
|
867
|
+
|
|
868
|
+
// authentication bearer required
|
|
869
|
+
// http bearer authentication required
|
|
870
|
+
if (configuration && configuration.accessToken) {
|
|
871
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
872
|
+
? await configuration.accessToken()
|
|
873
|
+
: await configuration.accessToken;
|
|
874
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
// authentication x-store-key required
|
|
878
|
+
if (configuration && configuration.apiKey) {
|
|
879
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
880
|
+
? await configuration.apiKey("x-store-key")
|
|
881
|
+
: await configuration.apiKey;
|
|
882
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
886
|
+
|
|
887
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
888
|
+
for (const key in localVarQueryParameter) {
|
|
889
|
+
query.set(key, localVarQueryParameter[key]);
|
|
890
|
+
}
|
|
891
|
+
for (const key in options.params) {
|
|
892
|
+
query.set(key, options.params[key]);
|
|
893
|
+
}
|
|
894
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
895
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
896
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
897
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
898
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
899
|
+
|
|
900
|
+
return {
|
|
901
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
902
|
+
options: localVarRequestOptions,
|
|
903
|
+
};
|
|
904
|
+
},
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* AddressesApi - functional programming interface
|
|
910
|
+
* @export
|
|
911
|
+
*/
|
|
912
|
+
export const AddressesApiFp = function(configuration?: Configuration) {
|
|
913
|
+
return {
|
|
914
|
+
/**
|
|
915
|
+
*
|
|
916
|
+
* @summary Create address for user
|
|
917
|
+
* @param {CreateAddressDto} body
|
|
918
|
+
* @param {string} userId
|
|
919
|
+
* @param {*} [options] Override http request option.
|
|
920
|
+
* @throws {RequiredError}
|
|
921
|
+
*/
|
|
922
|
+
async adminCreateAddressForUser(body: CreateAddressDto, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
923
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).adminCreateAddressForUser(body, userId, options);
|
|
924
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
925
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
926
|
+
return axios.request(axiosRequestArgs);
|
|
927
|
+
};
|
|
928
|
+
},
|
|
929
|
+
/**
|
|
930
|
+
*
|
|
931
|
+
* @summary Delete address
|
|
932
|
+
* @param {string} addressId
|
|
933
|
+
* @param {*} [options] Override http request option.
|
|
934
|
+
* @throws {RequiredError}
|
|
935
|
+
*/
|
|
936
|
+
async adminDeleteUserAddress(addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
937
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).adminDeleteUserAddress(addressId, options);
|
|
938
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
939
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
940
|
+
return axios.request(axiosRequestArgs);
|
|
941
|
+
};
|
|
942
|
+
},
|
|
943
|
+
/**
|
|
944
|
+
*
|
|
945
|
+
* @summary Get all addresses for user
|
|
946
|
+
* @param {string} userId
|
|
947
|
+
* @param {*} [options] Override http request option.
|
|
948
|
+
* @throws {RequiredError}
|
|
949
|
+
*/
|
|
950
|
+
async adminGetSingleUserAddresses(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Address>>>> {
|
|
951
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).adminGetSingleUserAddresses(userId, options);
|
|
952
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
953
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
954
|
+
return axios.request(axiosRequestArgs);
|
|
955
|
+
};
|
|
956
|
+
},
|
|
957
|
+
/**
|
|
958
|
+
*
|
|
959
|
+
* @summary Update address
|
|
960
|
+
* @param {UpdateAddressDto} body
|
|
961
|
+
* @param {string} addressId
|
|
962
|
+
* @param {*} [options] Override http request option.
|
|
963
|
+
* @throws {RequiredError}
|
|
964
|
+
*/
|
|
965
|
+
async adminUpdateUserAddress(body: UpdateAddressDto, addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
966
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).adminUpdateUserAddress(body, addressId, options);
|
|
967
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
968
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
969
|
+
return axios.request(axiosRequestArgs);
|
|
970
|
+
};
|
|
971
|
+
},
|
|
972
|
+
/**
|
|
973
|
+
*
|
|
974
|
+
* @summary Create address for store
|
|
975
|
+
* @param {CreateStoreAddressDto} body
|
|
976
|
+
* @param {*} [options] Override http request option.
|
|
977
|
+
* @throws {RequiredError}
|
|
978
|
+
*/
|
|
979
|
+
async createAddressForStore(body: CreateStoreAddressDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
980
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).createAddressForStore(body, options);
|
|
981
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
982
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
983
|
+
return axios.request(axiosRequestArgs);
|
|
984
|
+
};
|
|
985
|
+
},
|
|
986
|
+
/**
|
|
987
|
+
*
|
|
988
|
+
* @summary Create address for user
|
|
989
|
+
* @param {CreateAddressDto} body
|
|
990
|
+
* @param {*} [options] Override http request option.
|
|
991
|
+
* @throws {RequiredError}
|
|
992
|
+
*/
|
|
993
|
+
async createAddressForUser(body: CreateAddressDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
994
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).createAddressForUser(body, options);
|
|
995
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
996
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
997
|
+
return axios.request(axiosRequestArgs);
|
|
998
|
+
};
|
|
999
|
+
},
|
|
1000
|
+
/**
|
|
1001
|
+
*
|
|
1002
|
+
* @summary Delete address
|
|
1003
|
+
* @param {string} addressId
|
|
1004
|
+
* @param {*} [options] Override http request option.
|
|
1005
|
+
* @throws {RequiredError}
|
|
1006
|
+
*/
|
|
1007
|
+
async deleteUserAddress(addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
1008
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).deleteUserAddress(addressId, options);
|
|
1009
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1010
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1011
|
+
return axios.request(axiosRequestArgs);
|
|
1012
|
+
};
|
|
1013
|
+
},
|
|
1014
|
+
/**
|
|
1015
|
+
*
|
|
1016
|
+
* @summary Get all addresses for store
|
|
1017
|
+
* @param {string} storeId
|
|
1018
|
+
* @param {*} [options] Override http request option.
|
|
1019
|
+
* @throws {RequiredError}
|
|
1020
|
+
*/
|
|
1021
|
+
async getAllStoreAddresses(storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Address>>>> {
|
|
1022
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).getAllStoreAddresses(storeId, options);
|
|
1023
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1024
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1025
|
+
return axios.request(axiosRequestArgs);
|
|
1026
|
+
};
|
|
1027
|
+
},
|
|
1028
|
+
/**
|
|
1029
|
+
*
|
|
1030
|
+
* @summary Get all addresses for user
|
|
1031
|
+
* @param {*} [options] Override http request option.
|
|
1032
|
+
* @throws {RequiredError}
|
|
1033
|
+
*/
|
|
1034
|
+
async getAllUserAddresses(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Address>>>> {
|
|
1035
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).getAllUserAddresses(options);
|
|
1036
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1037
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1038
|
+
return axios.request(axiosRequestArgs);
|
|
1039
|
+
};
|
|
1040
|
+
},
|
|
1041
|
+
/**
|
|
1042
|
+
*
|
|
1043
|
+
* @summary Get all addresses for user
|
|
1044
|
+
* @param {*} [options] Override http request option.
|
|
1045
|
+
* @throws {RequiredError}
|
|
1046
|
+
*/
|
|
1047
|
+
async getMyAddresses(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Address>>>> {
|
|
1048
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).getMyAddresses(options);
|
|
1049
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1050
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1051
|
+
return axios.request(axiosRequestArgs);
|
|
1052
|
+
};
|
|
1053
|
+
},
|
|
1054
|
+
/**
|
|
1055
|
+
*
|
|
1056
|
+
* @summary Get default address for user
|
|
1057
|
+
* @param {*} [options] Override http request option.
|
|
1058
|
+
* @throws {RequiredError}
|
|
1059
|
+
*/
|
|
1060
|
+
async getMyDefaultAddress(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
1061
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).getMyDefaultAddress(options);
|
|
1062
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1063
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1064
|
+
return axios.request(axiosRequestArgs);
|
|
1065
|
+
};
|
|
1066
|
+
},
|
|
1067
|
+
/**
|
|
1068
|
+
*
|
|
1069
|
+
* @summary Get single address
|
|
1070
|
+
* @param {string} addressId
|
|
1071
|
+
* @param {*} [options] Override http request option.
|
|
1072
|
+
* @throws {RequiredError}
|
|
1073
|
+
*/
|
|
1074
|
+
async getSingleAddress(addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
1075
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).getSingleAddress(addressId, options);
|
|
1076
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1077
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1078
|
+
return axios.request(axiosRequestArgs);
|
|
1079
|
+
};
|
|
1080
|
+
},
|
|
1081
|
+
/**
|
|
1082
|
+
*
|
|
1083
|
+
* @summary Set new default shipping address
|
|
1084
|
+
* @param {string} userId
|
|
1085
|
+
* @param {string} addressId
|
|
1086
|
+
* @param {*} [options] Override http request option.
|
|
1087
|
+
* @throws {RequiredError}
|
|
1088
|
+
*/
|
|
1089
|
+
async setDefaultShippingAddress(userId: string, addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
1090
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).setDefaultShippingAddress(userId, addressId, options);
|
|
1091
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1092
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1093
|
+
return axios.request(axiosRequestArgs);
|
|
1094
|
+
};
|
|
1095
|
+
},
|
|
1096
|
+
/**
|
|
1097
|
+
*
|
|
1098
|
+
* @summary Update default address for user
|
|
1099
|
+
* @param {string} addressId
|
|
1100
|
+
* @param {*} [options] Override http request option.
|
|
1101
|
+
* @throws {RequiredError}
|
|
1102
|
+
*/
|
|
1103
|
+
async updateDefaultAddress(addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
1104
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).updateDefaultAddress(addressId, options);
|
|
1105
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1106
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1107
|
+
return axios.request(axiosRequestArgs);
|
|
1108
|
+
};
|
|
1109
|
+
},
|
|
1110
|
+
/**
|
|
1111
|
+
*
|
|
1112
|
+
* @summary Update address
|
|
1113
|
+
* @param {UpdateAddressDto} body
|
|
1114
|
+
* @param {string} addressId
|
|
1115
|
+
* @param {*} [options] Override http request option.
|
|
1116
|
+
* @throws {RequiredError}
|
|
1117
|
+
*/
|
|
1118
|
+
async updateUserAddress(body: UpdateAddressDto, addressId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Address>>> {
|
|
1119
|
+
const localVarAxiosArgs = await AddressesApiAxiosParamCreator(configuration).updateUserAddress(body, addressId, options);
|
|
1120
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1121
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1122
|
+
return axios.request(axiosRequestArgs);
|
|
1123
|
+
};
|
|
1124
|
+
},
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* AddressesApi - factory interface
|
|
1130
|
+
* @export
|
|
1131
|
+
*/
|
|
1132
|
+
export const AddressesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1133
|
+
return {
|
|
1134
|
+
/**
|
|
1135
|
+
*
|
|
1136
|
+
* @summary Create address for user
|
|
1137
|
+
* @param {CreateAddressDto} body
|
|
1138
|
+
* @param {string} userId
|
|
1139
|
+
* @param {*} [options] Override http request option.
|
|
1140
|
+
* @throws {RequiredError}
|
|
1141
|
+
*/
|
|
1142
|
+
async adminCreateAddressForUser(body: CreateAddressDto, userId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1143
|
+
return AddressesApiFp(configuration).adminCreateAddressForUser(body, userId, options).then((request) => request(axios, basePath));
|
|
1144
|
+
},
|
|
1145
|
+
/**
|
|
1146
|
+
*
|
|
1147
|
+
* @summary Delete address
|
|
1148
|
+
* @param {string} addressId
|
|
1149
|
+
* @param {*} [options] Override http request option.
|
|
1150
|
+
* @throws {RequiredError}
|
|
1151
|
+
*/
|
|
1152
|
+
async adminDeleteUserAddress(addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1153
|
+
return AddressesApiFp(configuration).adminDeleteUserAddress(addressId, options).then((request) => request(axios, basePath));
|
|
1154
|
+
},
|
|
1155
|
+
/**
|
|
1156
|
+
*
|
|
1157
|
+
* @summary Get all addresses for user
|
|
1158
|
+
* @param {string} userId
|
|
1159
|
+
* @param {*} [options] Override http request option.
|
|
1160
|
+
* @throws {RequiredError}
|
|
1161
|
+
*/
|
|
1162
|
+
async adminGetSingleUserAddresses(userId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Address>>> {
|
|
1163
|
+
return AddressesApiFp(configuration).adminGetSingleUserAddresses(userId, options).then((request) => request(axios, basePath));
|
|
1164
|
+
},
|
|
1165
|
+
/**
|
|
1166
|
+
*
|
|
1167
|
+
* @summary Update address
|
|
1168
|
+
* @param {UpdateAddressDto} body
|
|
1169
|
+
* @param {string} addressId
|
|
1170
|
+
* @param {*} [options] Override http request option.
|
|
1171
|
+
* @throws {RequiredError}
|
|
1172
|
+
*/
|
|
1173
|
+
async adminUpdateUserAddress(body: UpdateAddressDto, addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1174
|
+
return AddressesApiFp(configuration).adminUpdateUserAddress(body, addressId, options).then((request) => request(axios, basePath));
|
|
1175
|
+
},
|
|
1176
|
+
/**
|
|
1177
|
+
*
|
|
1178
|
+
* @summary Create address for store
|
|
1179
|
+
* @param {CreateStoreAddressDto} body
|
|
1180
|
+
* @param {*} [options] Override http request option.
|
|
1181
|
+
* @throws {RequiredError}
|
|
1182
|
+
*/
|
|
1183
|
+
async createAddressForStore(body: CreateStoreAddressDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1184
|
+
return AddressesApiFp(configuration).createAddressForStore(body, options).then((request) => request(axios, basePath));
|
|
1185
|
+
},
|
|
1186
|
+
/**
|
|
1187
|
+
*
|
|
1188
|
+
* @summary Create address for user
|
|
1189
|
+
* @param {CreateAddressDto} body
|
|
1190
|
+
* @param {*} [options] Override http request option.
|
|
1191
|
+
* @throws {RequiredError}
|
|
1192
|
+
*/
|
|
1193
|
+
async createAddressForUser(body: CreateAddressDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1194
|
+
return AddressesApiFp(configuration).createAddressForUser(body, options).then((request) => request(axios, basePath));
|
|
1195
|
+
},
|
|
1196
|
+
/**
|
|
1197
|
+
*
|
|
1198
|
+
* @summary Delete address
|
|
1199
|
+
* @param {string} addressId
|
|
1200
|
+
* @param {*} [options] Override http request option.
|
|
1201
|
+
* @throws {RequiredError}
|
|
1202
|
+
*/
|
|
1203
|
+
async deleteUserAddress(addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1204
|
+
return AddressesApiFp(configuration).deleteUserAddress(addressId, options).then((request) => request(axios, basePath));
|
|
1205
|
+
},
|
|
1206
|
+
/**
|
|
1207
|
+
*
|
|
1208
|
+
* @summary Get all addresses for store
|
|
1209
|
+
* @param {string} storeId
|
|
1210
|
+
* @param {*} [options] Override http request option.
|
|
1211
|
+
* @throws {RequiredError}
|
|
1212
|
+
*/
|
|
1213
|
+
async getAllStoreAddresses(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Address>>> {
|
|
1214
|
+
return AddressesApiFp(configuration).getAllStoreAddresses(storeId, options).then((request) => request(axios, basePath));
|
|
1215
|
+
},
|
|
1216
|
+
/**
|
|
1217
|
+
*
|
|
1218
|
+
* @summary Get all addresses for user
|
|
1219
|
+
* @param {*} [options] Override http request option.
|
|
1220
|
+
* @throws {RequiredError}
|
|
1221
|
+
*/
|
|
1222
|
+
async getAllUserAddresses(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Address>>> {
|
|
1223
|
+
return AddressesApiFp(configuration).getAllUserAddresses(options).then((request) => request(axios, basePath));
|
|
1224
|
+
},
|
|
1225
|
+
/**
|
|
1226
|
+
*
|
|
1227
|
+
* @summary Get all addresses for user
|
|
1228
|
+
* @param {*} [options] Override http request option.
|
|
1229
|
+
* @throws {RequiredError}
|
|
1230
|
+
*/
|
|
1231
|
+
async getMyAddresses(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Address>>> {
|
|
1232
|
+
return AddressesApiFp(configuration).getMyAddresses(options).then((request) => request(axios, basePath));
|
|
1233
|
+
},
|
|
1234
|
+
/**
|
|
1235
|
+
*
|
|
1236
|
+
* @summary Get default address for user
|
|
1237
|
+
* @param {*} [options] Override http request option.
|
|
1238
|
+
* @throws {RequiredError}
|
|
1239
|
+
*/
|
|
1240
|
+
async getMyDefaultAddress(options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1241
|
+
return AddressesApiFp(configuration).getMyDefaultAddress(options).then((request) => request(axios, basePath));
|
|
1242
|
+
},
|
|
1243
|
+
/**
|
|
1244
|
+
*
|
|
1245
|
+
* @summary Get single address
|
|
1246
|
+
* @param {string} addressId
|
|
1247
|
+
* @param {*} [options] Override http request option.
|
|
1248
|
+
* @throws {RequiredError}
|
|
1249
|
+
*/
|
|
1250
|
+
async getSingleAddress(addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1251
|
+
return AddressesApiFp(configuration).getSingleAddress(addressId, options).then((request) => request(axios, basePath));
|
|
1252
|
+
},
|
|
1253
|
+
/**
|
|
1254
|
+
*
|
|
1255
|
+
* @summary Set new default shipping address
|
|
1256
|
+
* @param {string} userId
|
|
1257
|
+
* @param {string} addressId
|
|
1258
|
+
* @param {*} [options] Override http request option.
|
|
1259
|
+
* @throws {RequiredError}
|
|
1260
|
+
*/
|
|
1261
|
+
async setDefaultShippingAddress(userId: string, addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1262
|
+
return AddressesApiFp(configuration).setDefaultShippingAddress(userId, addressId, options).then((request) => request(axios, basePath));
|
|
1263
|
+
},
|
|
1264
|
+
/**
|
|
1265
|
+
*
|
|
1266
|
+
* @summary Update default address for user
|
|
1267
|
+
* @param {string} addressId
|
|
1268
|
+
* @param {*} [options] Override http request option.
|
|
1269
|
+
* @throws {RequiredError}
|
|
1270
|
+
*/
|
|
1271
|
+
async updateDefaultAddress(addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1272
|
+
return AddressesApiFp(configuration).updateDefaultAddress(addressId, options).then((request) => request(axios, basePath));
|
|
1273
|
+
},
|
|
1274
|
+
/**
|
|
1275
|
+
*
|
|
1276
|
+
* @summary Update address
|
|
1277
|
+
* @param {UpdateAddressDto} body
|
|
1278
|
+
* @param {string} addressId
|
|
1279
|
+
* @param {*} [options] Override http request option.
|
|
1280
|
+
* @throws {RequiredError}
|
|
1281
|
+
*/
|
|
1282
|
+
async updateUserAddress(body: UpdateAddressDto, addressId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Address>> {
|
|
1283
|
+
return AddressesApiFp(configuration).updateUserAddress(body, addressId, options).then((request) => request(axios, basePath));
|
|
1284
|
+
},
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* AddressesApi - object-oriented interface
|
|
1290
|
+
* @export
|
|
1291
|
+
* @class AddressesApi
|
|
1292
|
+
* @extends {BaseAPI}
|
|
1293
|
+
*/
|
|
1294
|
+
export class AddressesApi extends BaseAPI {
|
|
1295
|
+
/**
|
|
1296
|
+
*
|
|
1297
|
+
* @summary Create address for user
|
|
1298
|
+
* @param {CreateAddressDto} body
|
|
1299
|
+
* @param {string} userId
|
|
1300
|
+
* @param {*} [options] Override http request option.
|
|
1301
|
+
* @throws {RequiredError}
|
|
1302
|
+
* @memberof AddressesApi
|
|
1303
|
+
*/
|
|
1304
|
+
public async adminCreateAddressForUser(body: CreateAddressDto, userId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1305
|
+
return AddressesApiFp(this.configuration).adminCreateAddressForUser(body, userId, options).then((request) => request(this.axios, this.basePath));
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
*
|
|
1309
|
+
* @summary Delete address
|
|
1310
|
+
* @param {string} addressId
|
|
1311
|
+
* @param {*} [options] Override http request option.
|
|
1312
|
+
* @throws {RequiredError}
|
|
1313
|
+
* @memberof AddressesApi
|
|
1314
|
+
*/
|
|
1315
|
+
public async adminDeleteUserAddress(addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1316
|
+
return AddressesApiFp(this.configuration).adminDeleteUserAddress(addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
*
|
|
1320
|
+
* @summary Get all addresses for user
|
|
1321
|
+
* @param {string} userId
|
|
1322
|
+
* @param {*} [options] Override http request option.
|
|
1323
|
+
* @throws {RequiredError}
|
|
1324
|
+
* @memberof AddressesApi
|
|
1325
|
+
*/
|
|
1326
|
+
public async adminGetSingleUserAddresses(userId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Address>>> {
|
|
1327
|
+
return AddressesApiFp(this.configuration).adminGetSingleUserAddresses(userId, options).then((request) => request(this.axios, this.basePath));
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
*
|
|
1331
|
+
* @summary Update address
|
|
1332
|
+
* @param {UpdateAddressDto} body
|
|
1333
|
+
* @param {string} addressId
|
|
1334
|
+
* @param {*} [options] Override http request option.
|
|
1335
|
+
* @throws {RequiredError}
|
|
1336
|
+
* @memberof AddressesApi
|
|
1337
|
+
*/
|
|
1338
|
+
public async adminUpdateUserAddress(body: UpdateAddressDto, addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1339
|
+
return AddressesApiFp(this.configuration).adminUpdateUserAddress(body, addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
*
|
|
1343
|
+
* @summary Create address for store
|
|
1344
|
+
* @param {CreateStoreAddressDto} body
|
|
1345
|
+
* @param {*} [options] Override http request option.
|
|
1346
|
+
* @throws {RequiredError}
|
|
1347
|
+
* @memberof AddressesApi
|
|
1348
|
+
*/
|
|
1349
|
+
public async createAddressForStore(body: CreateStoreAddressDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1350
|
+
return AddressesApiFp(this.configuration).createAddressForStore(body, options).then((request) => request(this.axios, this.basePath));
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
*
|
|
1354
|
+
* @summary Create address for user
|
|
1355
|
+
* @param {CreateAddressDto} body
|
|
1356
|
+
* @param {*} [options] Override http request option.
|
|
1357
|
+
* @throws {RequiredError}
|
|
1358
|
+
* @memberof AddressesApi
|
|
1359
|
+
*/
|
|
1360
|
+
public async createAddressForUser(body: CreateAddressDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1361
|
+
return AddressesApiFp(this.configuration).createAddressForUser(body, options).then((request) => request(this.axios, this.basePath));
|
|
1362
|
+
}
|
|
1363
|
+
/**
|
|
1364
|
+
*
|
|
1365
|
+
* @summary Delete address
|
|
1366
|
+
* @param {string} addressId
|
|
1367
|
+
* @param {*} [options] Override http request option.
|
|
1368
|
+
* @throws {RequiredError}
|
|
1369
|
+
* @memberof AddressesApi
|
|
1370
|
+
*/
|
|
1371
|
+
public async deleteUserAddress(addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1372
|
+
return AddressesApiFp(this.configuration).deleteUserAddress(addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
*
|
|
1376
|
+
* @summary Get all addresses for store
|
|
1377
|
+
* @param {string} storeId
|
|
1378
|
+
* @param {*} [options] Override http request option.
|
|
1379
|
+
* @throws {RequiredError}
|
|
1380
|
+
* @memberof AddressesApi
|
|
1381
|
+
*/
|
|
1382
|
+
public async getAllStoreAddresses(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Address>>> {
|
|
1383
|
+
return AddressesApiFp(this.configuration).getAllStoreAddresses(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
1384
|
+
}
|
|
1385
|
+
/**
|
|
1386
|
+
*
|
|
1387
|
+
* @summary Get all addresses for user
|
|
1388
|
+
* @param {*} [options] Override http request option.
|
|
1389
|
+
* @throws {RequiredError}
|
|
1390
|
+
* @memberof AddressesApi
|
|
1391
|
+
*/
|
|
1392
|
+
public async getAllUserAddresses(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Address>>> {
|
|
1393
|
+
return AddressesApiFp(this.configuration).getAllUserAddresses(options).then((request) => request(this.axios, this.basePath));
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
*
|
|
1397
|
+
* @summary Get all addresses for user
|
|
1398
|
+
* @param {*} [options] Override http request option.
|
|
1399
|
+
* @throws {RequiredError}
|
|
1400
|
+
* @memberof AddressesApi
|
|
1401
|
+
*/
|
|
1402
|
+
public async getMyAddresses(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Address>>> {
|
|
1403
|
+
return AddressesApiFp(this.configuration).getMyAddresses(options).then((request) => request(this.axios, this.basePath));
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
*
|
|
1407
|
+
* @summary Get default address for user
|
|
1408
|
+
* @param {*} [options] Override http request option.
|
|
1409
|
+
* @throws {RequiredError}
|
|
1410
|
+
* @memberof AddressesApi
|
|
1411
|
+
*/
|
|
1412
|
+
public async getMyDefaultAddress(options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1413
|
+
return AddressesApiFp(this.configuration).getMyDefaultAddress(options).then((request) => request(this.axios, this.basePath));
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
*
|
|
1417
|
+
* @summary Get single address
|
|
1418
|
+
* @param {string} addressId
|
|
1419
|
+
* @param {*} [options] Override http request option.
|
|
1420
|
+
* @throws {RequiredError}
|
|
1421
|
+
* @memberof AddressesApi
|
|
1422
|
+
*/
|
|
1423
|
+
public async getSingleAddress(addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1424
|
+
return AddressesApiFp(this.configuration).getSingleAddress(addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
*
|
|
1428
|
+
* @summary Set new default shipping address
|
|
1429
|
+
* @param {string} userId
|
|
1430
|
+
* @param {string} addressId
|
|
1431
|
+
* @param {*} [options] Override http request option.
|
|
1432
|
+
* @throws {RequiredError}
|
|
1433
|
+
* @memberof AddressesApi
|
|
1434
|
+
*/
|
|
1435
|
+
public async setDefaultShippingAddress(userId: string, addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1436
|
+
return AddressesApiFp(this.configuration).setDefaultShippingAddress(userId, addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1437
|
+
}
|
|
1438
|
+
/**
|
|
1439
|
+
*
|
|
1440
|
+
* @summary Update default address for user
|
|
1441
|
+
* @param {string} addressId
|
|
1442
|
+
* @param {*} [options] Override http request option.
|
|
1443
|
+
* @throws {RequiredError}
|
|
1444
|
+
* @memberof AddressesApi
|
|
1445
|
+
*/
|
|
1446
|
+
public async updateDefaultAddress(addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1447
|
+
return AddressesApiFp(this.configuration).updateDefaultAddress(addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
*
|
|
1451
|
+
* @summary Update address
|
|
1452
|
+
* @param {UpdateAddressDto} body
|
|
1453
|
+
* @param {string} addressId
|
|
1454
|
+
* @param {*} [options] Override http request option.
|
|
1455
|
+
* @throws {RequiredError}
|
|
1456
|
+
* @memberof AddressesApi
|
|
1457
|
+
*/
|
|
1458
|
+
public async updateUserAddress(body: UpdateAddressDto, addressId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Address>> {
|
|
1459
|
+
return AddressesApiFp(this.configuration).updateUserAddress(body, addressId, options).then((request) => request(this.axios, this.basePath));
|
|
1460
|
+
}
|
|
1461
|
+
}
|