hey-pharmacist-ecommerce 1.1.20 → 1.1.22
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/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +722 -487
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +724 -489
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/CartItem.tsx +29 -17
- package/src/lib/Apis/api.ts +0 -1
- package/src/lib/Apis/apis/products-api.ts +187 -0
- package/src/lib/Apis/apis/stores-api.ts +244 -0
- package/src/lib/Apis/models/create-product-dto.ts +6 -0
- package/src/lib/Apis/models/create-single-variant-product-dto.ts +6 -0
- package/src/lib/Apis/models/extended-product-dto.ts +6 -0
- package/src/lib/Apis/models/index.ts +2 -0
- package/src/lib/Apis/models/new-client-email-dto.ts +159 -0
- package/src/lib/Apis/models/product.ts +6 -0
- package/src/lib/Apis/models/schedule-tour-email-dto.ts +45 -0
- package/src/lib/Apis/models/update-product-dto.ts +6 -0
- package/src/lib/Apis/sharedConfig.ts +9 -0
- package/src/lib/Apis/wrapper.ts +11 -16
- package/src/lib/api-adapter/config.ts +12 -6
- package/src/providers/CartProvider.tsx +152 -82
- package/src/screens/CartScreen.tsx +1 -1
- package/src/screens/CheckoutScreen.tsx +21 -6
- package/src/screens/ProductDetailScreen.tsx +140 -132
- package/src/styles/globals.css +15 -5
- package/src/lib/Apis/apis/inventory-api.ts +0 -267
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hey-pharmacist-ecommerce",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "Production-ready, multi-tenant e‑commerce UI + API adapter for Next.js with auth, carts, checkout, orders, theming, and pharmacist-focused UX.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
"url": "https://github.com/yourusername/hey-pharmacist-customer/issues"
|
|
72
72
|
},
|
|
73
73
|
"homepage": "https://github.com/yourusername/hey-pharmacist-customer#readme"
|
|
74
|
-
}
|
|
74
|
+
}
|
|
@@ -16,6 +16,7 @@ interface CartItemProps {
|
|
|
16
16
|
export function CartItem({ item }: CartItemProps) {
|
|
17
17
|
const { updateQuantity, removeFromCart } = useCart();
|
|
18
18
|
const [isUpdating, setIsUpdating] = useState(false);
|
|
19
|
+
const [isRemoving, setIsRemoving] = useState(false);
|
|
19
20
|
|
|
20
21
|
const handleUpdateQuantity = async (newQuantity: number) => {
|
|
21
22
|
if (newQuantity < 1) return;
|
|
@@ -28,7 +29,12 @@ export function CartItem({ item }: CartItemProps) {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
const handleRemove = async () => {
|
|
31
|
-
|
|
32
|
+
setIsRemoving(true);
|
|
33
|
+
try {
|
|
34
|
+
await removeFromCart(item.productVariantId);
|
|
35
|
+
} finally {
|
|
36
|
+
setIsRemoving(false);
|
|
37
|
+
}
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
const itemTotal = item.productVariantData.finalPrice * item.quantity;
|
|
@@ -74,23 +80,29 @@ export function CartItem({ item }: CartItemProps) {
|
|
|
74
80
|
<h3 className="font-['Poppins',sans-serif] font-semibold text-[#2B4B7C] mb-2">
|
|
75
81
|
{item.productVariantData.name}
|
|
76
82
|
</h3>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
84
|
+
<span className="font-['Poppins',sans-serif] text-[12px] text-[#676c80]">
|
|
85
|
+
Variant: <span className="font-medium text-[#2B4B7C]">{item.productVariantData.name}</span>
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
83
89
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
{/* Delete Icon - Top Right */}
|
|
91
|
+
<button
|
|
92
|
+
onClick={handleRemove}
|
|
93
|
+
disabled={isRemoving || isUpdating}
|
|
94
|
+
className={`p-2 rounded-full transition-colors group ${isRemoving ? 'bg-red-50 cursor-not-allowed' : 'hover:bg-red-50'
|
|
95
|
+
}`}
|
|
96
|
+
aria-label="Remove item"
|
|
97
|
+
>
|
|
98
|
+
{isRemoving ? (
|
|
99
|
+
<span className="inline-block h-5 w-5 animate-spin rounded-full border-2 border-red-500 border-t-transparent" />
|
|
100
|
+
) : (
|
|
101
|
+
<Trash2 className="size-5 text-[#676c80] group-hover:text-red-500 transition-colors" />
|
|
102
|
+
)}
|
|
103
|
+
</button>
|
|
92
104
|
</div>
|
|
93
|
-
|
|
105
|
+
|
|
94
106
|
{/* Quantity and Price */}
|
|
95
107
|
<div className="flex items-center justify-between gap-4">
|
|
96
108
|
{/* Quantity Controls */}
|
|
@@ -124,7 +136,7 @@ export function CartItem({ item }: CartItemProps) {
|
|
|
124
136
|
</p>
|
|
125
137
|
</div>
|
|
126
138
|
</div>
|
|
127
|
-
|
|
139
|
+
</div>
|
|
128
140
|
|
|
129
141
|
</div>
|
|
130
142
|
</motion.div>
|
package/src/lib/Apis/api.ts
CHANGED
|
@@ -23,7 +23,6 @@ export * from './apis/events-api';
|
|
|
23
23
|
export * from './apis/file-proccesor-api';
|
|
24
24
|
export * from './apis/health-api';
|
|
25
25
|
export * from './apis/images-api';
|
|
26
|
-
export * from './apis/inventory-api';
|
|
27
26
|
export * from './apis/marketing-api';
|
|
28
27
|
export * from './apis/notifications-api';
|
|
29
28
|
export * from './apis/open-aiapi';
|
|
@@ -587,6 +587,57 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
587
587
|
options: localVarRequestOptions,
|
|
588
588
|
};
|
|
589
589
|
},
|
|
590
|
+
/**
|
|
591
|
+
*
|
|
592
|
+
* @summary Get the featured product for home screen
|
|
593
|
+
* @param {*} [options] Override http request option.
|
|
594
|
+
* @throws {RequiredError}
|
|
595
|
+
*/
|
|
596
|
+
getFeaturedProduct: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
597
|
+
const localVarPath = `/products/featured`;
|
|
598
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
599
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
600
|
+
let baseOptions;
|
|
601
|
+
if (configuration) {
|
|
602
|
+
baseOptions = configuration.baseOptions;
|
|
603
|
+
}
|
|
604
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
605
|
+
const localVarHeaderParameter = {} as any;
|
|
606
|
+
const localVarQueryParameter = {} as any;
|
|
607
|
+
|
|
608
|
+
// authentication bearer required
|
|
609
|
+
// http bearer authentication required
|
|
610
|
+
if (configuration && configuration.accessToken) {
|
|
611
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
612
|
+
? await configuration.accessToken()
|
|
613
|
+
: await configuration.accessToken;
|
|
614
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
// authentication x-store-key required
|
|
618
|
+
if (configuration && configuration.apiKey) {
|
|
619
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
620
|
+
? await configuration.apiKey("x-store-key")
|
|
621
|
+
: await configuration.apiKey;
|
|
622
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
626
|
+
for (const key in localVarQueryParameter) {
|
|
627
|
+
query.set(key, localVarQueryParameter[key]);
|
|
628
|
+
}
|
|
629
|
+
for (const key in options.params) {
|
|
630
|
+
query.set(key, options.params[key]);
|
|
631
|
+
}
|
|
632
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
633
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
634
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
635
|
+
|
|
636
|
+
return {
|
|
637
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
638
|
+
options: localVarRequestOptions,
|
|
639
|
+
};
|
|
640
|
+
},
|
|
590
641
|
/**
|
|
591
642
|
*
|
|
592
643
|
* @summary Get insights on store Products
|
|
@@ -823,6 +874,72 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
823
874
|
options: localVarRequestOptions,
|
|
824
875
|
};
|
|
825
876
|
},
|
|
877
|
+
/**
|
|
878
|
+
*
|
|
879
|
+
* @summary Set or unset a product as featured for home screen
|
|
880
|
+
* @param {string} id Product ID
|
|
881
|
+
* @param {boolean} featured Whether to set the product as featured
|
|
882
|
+
* @param {*} [options] Override http request option.
|
|
883
|
+
* @throws {RequiredError}
|
|
884
|
+
*/
|
|
885
|
+
setFeaturedProduct: async (id: string, featured: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
886
|
+
// verify required parameter 'id' is not null or undefined
|
|
887
|
+
if (id === null || id === undefined) {
|
|
888
|
+
throw new RequiredError('id','Required parameter id was null or undefined when calling setFeaturedProduct.');
|
|
889
|
+
}
|
|
890
|
+
// verify required parameter 'featured' is not null or undefined
|
|
891
|
+
if (featured === null || featured === undefined) {
|
|
892
|
+
throw new RequiredError('featured','Required parameter featured was null or undefined when calling setFeaturedProduct.');
|
|
893
|
+
}
|
|
894
|
+
const localVarPath = `/products/{id}/featured`
|
|
895
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
896
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
897
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
898
|
+
let baseOptions;
|
|
899
|
+
if (configuration) {
|
|
900
|
+
baseOptions = configuration.baseOptions;
|
|
901
|
+
}
|
|
902
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
|
|
903
|
+
const localVarHeaderParameter = {} as any;
|
|
904
|
+
const localVarQueryParameter = {} as any;
|
|
905
|
+
|
|
906
|
+
// authentication bearer required
|
|
907
|
+
// http bearer authentication required
|
|
908
|
+
if (configuration && configuration.accessToken) {
|
|
909
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
910
|
+
? await configuration.accessToken()
|
|
911
|
+
: await configuration.accessToken;
|
|
912
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
// authentication x-store-key required
|
|
916
|
+
if (configuration && configuration.apiKey) {
|
|
917
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
918
|
+
? await configuration.apiKey("x-store-key")
|
|
919
|
+
: await configuration.apiKey;
|
|
920
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
if (featured !== undefined) {
|
|
924
|
+
localVarQueryParameter['featured'] = featured;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
928
|
+
for (const key in localVarQueryParameter) {
|
|
929
|
+
query.set(key, localVarQueryParameter[key]);
|
|
930
|
+
}
|
|
931
|
+
for (const key in options.params) {
|
|
932
|
+
query.set(key, options.params[key]);
|
|
933
|
+
}
|
|
934
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
935
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
936
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
937
|
+
|
|
938
|
+
return {
|
|
939
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
940
|
+
options: localVarRequestOptions,
|
|
941
|
+
};
|
|
942
|
+
},
|
|
826
943
|
/**
|
|
827
944
|
*
|
|
828
945
|
* @summary Update a product
|
|
@@ -1027,6 +1144,19 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1027
1144
|
return axios.request(axiosRequestArgs);
|
|
1028
1145
|
};
|
|
1029
1146
|
},
|
|
1147
|
+
/**
|
|
1148
|
+
*
|
|
1149
|
+
* @summary Get the featured product for home screen
|
|
1150
|
+
* @param {*} [options] Override http request option.
|
|
1151
|
+
* @throws {RequiredError}
|
|
1152
|
+
*/
|
|
1153
|
+
async getFeaturedProduct(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ExtendedProductDTO>>> {
|
|
1154
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).getFeaturedProduct(options);
|
|
1155
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1156
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1157
|
+
return axios.request(axiosRequestArgs);
|
|
1158
|
+
};
|
|
1159
|
+
},
|
|
1030
1160
|
/**
|
|
1031
1161
|
*
|
|
1032
1162
|
* @summary Get insights on store Products
|
|
@@ -1085,6 +1215,21 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1085
1215
|
return axios.request(axiosRequestArgs);
|
|
1086
1216
|
};
|
|
1087
1217
|
},
|
|
1218
|
+
/**
|
|
1219
|
+
*
|
|
1220
|
+
* @summary Set or unset a product as featured for home screen
|
|
1221
|
+
* @param {string} id Product ID
|
|
1222
|
+
* @param {boolean} featured Whether to set the product as featured
|
|
1223
|
+
* @param {*} [options] Override http request option.
|
|
1224
|
+
* @throws {RequiredError}
|
|
1225
|
+
*/
|
|
1226
|
+
async setFeaturedProduct(id: string, featured: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ExtendedProductDTO>>> {
|
|
1227
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).setFeaturedProduct(id, featured, options);
|
|
1228
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1229
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1230
|
+
return axios.request(axiosRequestArgs);
|
|
1231
|
+
};
|
|
1232
|
+
},
|
|
1088
1233
|
/**
|
|
1089
1234
|
*
|
|
1090
1235
|
* @summary Update a product
|
|
@@ -1210,6 +1355,15 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1210
1355
|
async getAllProductsForStore(searchTerm?: string, productType?: string, categoryId?: string, maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, includeNoVariantProducts?: boolean, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1211
1356
|
return ProductsApiFp(configuration).getAllProductsForStore(searchTerm, productType, categoryId, maxPrice, minPrice, brandFilter, availability, sort, includeNoVariantProducts, isActive, limit, page, options).then((request) => request(axios, basePath));
|
|
1212
1357
|
},
|
|
1358
|
+
/**
|
|
1359
|
+
*
|
|
1360
|
+
* @summary Get the featured product for home screen
|
|
1361
|
+
* @param {*} [options] Override http request option.
|
|
1362
|
+
* @throws {RequiredError}
|
|
1363
|
+
*/
|
|
1364
|
+
async getFeaturedProduct(options?: AxiosRequestConfig): Promise<AxiosResponse<ExtendedProductDTO>> {
|
|
1365
|
+
return ProductsApiFp(configuration).getFeaturedProduct(options).then((request) => request(axios, basePath));
|
|
1366
|
+
},
|
|
1213
1367
|
/**
|
|
1214
1368
|
*
|
|
1215
1369
|
* @summary Get insights on store Products
|
|
@@ -1252,6 +1406,17 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1252
1406
|
async getTopSellingProducts(limit?: number, page?: number, isActive?: boolean, includeNoVariantProducts?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1253
1407
|
return ProductsApiFp(configuration).getTopSellingProducts(limit, page, isActive, includeNoVariantProducts, options).then((request) => request(axios, basePath));
|
|
1254
1408
|
},
|
|
1409
|
+
/**
|
|
1410
|
+
*
|
|
1411
|
+
* @summary Set or unset a product as featured for home screen
|
|
1412
|
+
* @param {string} id Product ID
|
|
1413
|
+
* @param {boolean} featured Whether to set the product as featured
|
|
1414
|
+
* @param {*} [options] Override http request option.
|
|
1415
|
+
* @throws {RequiredError}
|
|
1416
|
+
*/
|
|
1417
|
+
async setFeaturedProduct(id: string, featured: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<ExtendedProductDTO>> {
|
|
1418
|
+
return ProductsApiFp(configuration).setFeaturedProduct(id, featured, options).then((request) => request(axios, basePath));
|
|
1419
|
+
},
|
|
1255
1420
|
/**
|
|
1256
1421
|
*
|
|
1257
1422
|
* @summary Update a product
|
|
@@ -1381,6 +1546,16 @@ export class ProductsApi extends BaseAPI {
|
|
|
1381
1546
|
public async getAllProductsForStore(searchTerm?: string, productType?: string, categoryId?: string, maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, includeNoVariantProducts?: boolean, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1382
1547
|
return ProductsApiFp(this.configuration).getAllProductsForStore(searchTerm, productType, categoryId, maxPrice, minPrice, brandFilter, availability, sort, includeNoVariantProducts, isActive, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
1383
1548
|
}
|
|
1549
|
+
/**
|
|
1550
|
+
*
|
|
1551
|
+
* @summary Get the featured product for home screen
|
|
1552
|
+
* @param {*} [options] Override http request option.
|
|
1553
|
+
* @throws {RequiredError}
|
|
1554
|
+
* @memberof ProductsApi
|
|
1555
|
+
*/
|
|
1556
|
+
public async getFeaturedProduct(options?: AxiosRequestConfig) : Promise<AxiosResponse<ExtendedProductDTO>> {
|
|
1557
|
+
return ProductsApiFp(this.configuration).getFeaturedProduct(options).then((request) => request(this.axios, this.basePath));
|
|
1558
|
+
}
|
|
1384
1559
|
/**
|
|
1385
1560
|
*
|
|
1386
1561
|
* @summary Get insights on store Products
|
|
@@ -1427,6 +1602,18 @@ export class ProductsApi extends BaseAPI {
|
|
|
1427
1602
|
public async getTopSellingProducts(limit?: number, page?: number, isActive?: boolean, includeNoVariantProducts?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1428
1603
|
return ProductsApiFp(this.configuration).getTopSellingProducts(limit, page, isActive, includeNoVariantProducts, options).then((request) => request(this.axios, this.basePath));
|
|
1429
1604
|
}
|
|
1605
|
+
/**
|
|
1606
|
+
*
|
|
1607
|
+
* @summary Set or unset a product as featured for home screen
|
|
1608
|
+
* @param {string} id Product ID
|
|
1609
|
+
* @param {boolean} featured Whether to set the product as featured
|
|
1610
|
+
* @param {*} [options] Override http request option.
|
|
1611
|
+
* @throws {RequiredError}
|
|
1612
|
+
* @memberof ProductsApi
|
|
1613
|
+
*/
|
|
1614
|
+
public async setFeaturedProduct(id: string, featured: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<ExtendedProductDTO>> {
|
|
1615
|
+
return ProductsApiFp(this.configuration).setFeaturedProduct(id, featured, options).then((request) => request(this.axios, this.basePath));
|
|
1616
|
+
}
|
|
1430
1617
|
/**
|
|
1431
1618
|
*
|
|
1432
1619
|
* @summary Update a product
|
|
@@ -17,8 +17,10 @@ import { Configuration } from '../configuration';
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
19
|
import { CreateStoreDto } from '../models';
|
|
20
|
+
import { NewClientEmailDto } from '../models';
|
|
20
21
|
import { RefillRequest } from '../models';
|
|
21
22
|
import { RefillRequestDto } from '../models';
|
|
23
|
+
import { ScheduleTourEmailDto } from '../models';
|
|
22
24
|
import { StoreEntity } from '../models';
|
|
23
25
|
import { TransferePatientRequest } from '../models';
|
|
24
26
|
import { TransferePatientsRequestDto } from '../models';
|
|
@@ -617,6 +619,47 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
617
619
|
options: localVarRequestOptions,
|
|
618
620
|
};
|
|
619
621
|
},
|
|
622
|
+
/**
|
|
623
|
+
*
|
|
624
|
+
* @param {*} [options] Override http request option.
|
|
625
|
+
* @throws {RequiredError}
|
|
626
|
+
*/
|
|
627
|
+
sendHolyFamilyEmail: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
628
|
+
const localVarPath = `/stores/send-holy-family-email`;
|
|
629
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
630
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
631
|
+
let baseOptions;
|
|
632
|
+
if (configuration) {
|
|
633
|
+
baseOptions = configuration.baseOptions;
|
|
634
|
+
}
|
|
635
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
636
|
+
const localVarHeaderParameter = {} as any;
|
|
637
|
+
const localVarQueryParameter = {} as any;
|
|
638
|
+
|
|
639
|
+
// authentication x-store-key required
|
|
640
|
+
if (configuration && configuration.apiKey) {
|
|
641
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
642
|
+
? await configuration.apiKey("x-store-key")
|
|
643
|
+
: await configuration.apiKey;
|
|
644
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
648
|
+
for (const key in localVarQueryParameter) {
|
|
649
|
+
query.set(key, localVarQueryParameter[key]);
|
|
650
|
+
}
|
|
651
|
+
for (const key in options.params) {
|
|
652
|
+
query.set(key, options.params[key]);
|
|
653
|
+
}
|
|
654
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
655
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
656
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
657
|
+
|
|
658
|
+
return {
|
|
659
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
660
|
+
options: localVarRequestOptions,
|
|
661
|
+
};
|
|
662
|
+
},
|
|
620
663
|
/**
|
|
621
664
|
*
|
|
622
665
|
* @param {*} [options] Override http request option.
|
|
@@ -658,6 +701,57 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
658
701
|
options: localVarRequestOptions,
|
|
659
702
|
};
|
|
660
703
|
},
|
|
704
|
+
/**
|
|
705
|
+
*
|
|
706
|
+
* @summary Send new client email
|
|
707
|
+
* @param {NewClientEmailDto} body
|
|
708
|
+
* @param {*} [options] Override http request option.
|
|
709
|
+
* @throws {RequiredError}
|
|
710
|
+
*/
|
|
711
|
+
sendNewClientEmail: async (body: NewClientEmailDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
712
|
+
// verify required parameter 'body' is not null or undefined
|
|
713
|
+
if (body === null || body === undefined) {
|
|
714
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling sendNewClientEmail.');
|
|
715
|
+
}
|
|
716
|
+
const localVarPath = `/stores/send-new-client-email`;
|
|
717
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
718
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
719
|
+
let baseOptions;
|
|
720
|
+
if (configuration) {
|
|
721
|
+
baseOptions = configuration.baseOptions;
|
|
722
|
+
}
|
|
723
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
724
|
+
const localVarHeaderParameter = {} as any;
|
|
725
|
+
const localVarQueryParameter = {} as any;
|
|
726
|
+
|
|
727
|
+
// authentication x-store-key required
|
|
728
|
+
if (configuration && configuration.apiKey) {
|
|
729
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
730
|
+
? await configuration.apiKey("x-store-key")
|
|
731
|
+
: await configuration.apiKey;
|
|
732
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
736
|
+
|
|
737
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
738
|
+
for (const key in localVarQueryParameter) {
|
|
739
|
+
query.set(key, localVarQueryParameter[key]);
|
|
740
|
+
}
|
|
741
|
+
for (const key in options.params) {
|
|
742
|
+
query.set(key, options.params[key]);
|
|
743
|
+
}
|
|
744
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
745
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
746
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
747
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
748
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
749
|
+
|
|
750
|
+
return {
|
|
751
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
752
|
+
options: localVarRequestOptions,
|
|
753
|
+
};
|
|
754
|
+
},
|
|
661
755
|
/**
|
|
662
756
|
*
|
|
663
757
|
* @param {TransferePatientsRequestDto} body
|
|
@@ -758,6 +852,57 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
758
852
|
options: localVarRequestOptions,
|
|
759
853
|
};
|
|
760
854
|
},
|
|
855
|
+
/**
|
|
856
|
+
*
|
|
857
|
+
* @summary Send schedule tour email
|
|
858
|
+
* @param {ScheduleTourEmailDto} body
|
|
859
|
+
* @param {*} [options] Override http request option.
|
|
860
|
+
* @throws {RequiredError}
|
|
861
|
+
*/
|
|
862
|
+
sendScheduleTourEmail: async (body: ScheduleTourEmailDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
863
|
+
// verify required parameter 'body' is not null or undefined
|
|
864
|
+
if (body === null || body === undefined) {
|
|
865
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling sendScheduleTourEmail.');
|
|
866
|
+
}
|
|
867
|
+
const localVarPath = `/stores/send-schedule-tour-email`;
|
|
868
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
869
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
870
|
+
let baseOptions;
|
|
871
|
+
if (configuration) {
|
|
872
|
+
baseOptions = configuration.baseOptions;
|
|
873
|
+
}
|
|
874
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
875
|
+
const localVarHeaderParameter = {} as any;
|
|
876
|
+
const localVarQueryParameter = {} as any;
|
|
877
|
+
|
|
878
|
+
// authentication x-store-key required
|
|
879
|
+
if (configuration && configuration.apiKey) {
|
|
880
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
881
|
+
? await configuration.apiKey("x-store-key")
|
|
882
|
+
: await configuration.apiKey;
|
|
883
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
887
|
+
|
|
888
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
889
|
+
for (const key in localVarQueryParameter) {
|
|
890
|
+
query.set(key, localVarQueryParameter[key]);
|
|
891
|
+
}
|
|
892
|
+
for (const key in options.params) {
|
|
893
|
+
query.set(key, options.params[key]);
|
|
894
|
+
}
|
|
895
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
896
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
897
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
898
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
899
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
900
|
+
|
|
901
|
+
return {
|
|
902
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
903
|
+
options: localVarRequestOptions,
|
|
904
|
+
};
|
|
905
|
+
},
|
|
761
906
|
/**
|
|
762
907
|
*
|
|
763
908
|
* @summary Update refill request by id
|
|
@@ -1109,6 +1254,18 @@ export const StoresApiFp = function(configuration?: Configuration) {
|
|
|
1109
1254
|
return axios.request(axiosRequestArgs);
|
|
1110
1255
|
};
|
|
1111
1256
|
},
|
|
1257
|
+
/**
|
|
1258
|
+
*
|
|
1259
|
+
* @param {*} [options] Override http request option.
|
|
1260
|
+
* @throws {RequiredError}
|
|
1261
|
+
*/
|
|
1262
|
+
async sendHolyFamilyEmail(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
1263
|
+
const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).sendHolyFamilyEmail(options);
|
|
1264
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1265
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1266
|
+
return axios.request(axiosRequestArgs);
|
|
1267
|
+
};
|
|
1268
|
+
},
|
|
1112
1269
|
/**
|
|
1113
1270
|
*
|
|
1114
1271
|
* @param {*} [options] Override http request option.
|
|
@@ -1121,6 +1278,20 @@ export const StoresApiFp = function(configuration?: Configuration) {
|
|
|
1121
1278
|
return axios.request(axiosRequestArgs);
|
|
1122
1279
|
};
|
|
1123
1280
|
},
|
|
1281
|
+
/**
|
|
1282
|
+
*
|
|
1283
|
+
* @summary Send new client email
|
|
1284
|
+
* @param {NewClientEmailDto} body
|
|
1285
|
+
* @param {*} [options] Override http request option.
|
|
1286
|
+
* @throws {RequiredError}
|
|
1287
|
+
*/
|
|
1288
|
+
async sendNewClientEmail(body: NewClientEmailDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
1289
|
+
const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).sendNewClientEmail(body, options);
|
|
1290
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1291
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1292
|
+
return axios.request(axiosRequestArgs);
|
|
1293
|
+
};
|
|
1294
|
+
},
|
|
1124
1295
|
/**
|
|
1125
1296
|
*
|
|
1126
1297
|
* @param {TransferePatientsRequestDto} body
|
|
@@ -1147,6 +1318,20 @@ export const StoresApiFp = function(configuration?: Configuration) {
|
|
|
1147
1318
|
return axios.request(axiosRequestArgs);
|
|
1148
1319
|
};
|
|
1149
1320
|
},
|
|
1321
|
+
/**
|
|
1322
|
+
*
|
|
1323
|
+
* @summary Send schedule tour email
|
|
1324
|
+
* @param {ScheduleTourEmailDto} body
|
|
1325
|
+
* @param {*} [options] Override http request option.
|
|
1326
|
+
* @throws {RequiredError}
|
|
1327
|
+
*/
|
|
1328
|
+
async sendScheduleTourEmail(body: ScheduleTourEmailDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
1329
|
+
const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).sendScheduleTourEmail(body, options);
|
|
1330
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1331
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1332
|
+
return axios.request(axiosRequestArgs);
|
|
1333
|
+
};
|
|
1334
|
+
},
|
|
1150
1335
|
/**
|
|
1151
1336
|
*
|
|
1152
1337
|
* @summary Update refill request by id
|
|
@@ -1320,6 +1505,14 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
|
|
|
1320
1505
|
async sendGMJoinUsEmail(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1321
1506
|
return StoresApiFp(configuration).sendGMJoinUsEmail(options).then((request) => request(axios, basePath));
|
|
1322
1507
|
},
|
|
1508
|
+
/**
|
|
1509
|
+
*
|
|
1510
|
+
* @param {*} [options] Override http request option.
|
|
1511
|
+
* @throws {RequiredError}
|
|
1512
|
+
*/
|
|
1513
|
+
async sendHolyFamilyEmail(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1514
|
+
return StoresApiFp(configuration).sendHolyFamilyEmail(options).then((request) => request(axios, basePath));
|
|
1515
|
+
},
|
|
1323
1516
|
/**
|
|
1324
1517
|
*
|
|
1325
1518
|
* @param {*} [options] Override http request option.
|
|
@@ -1328,6 +1521,16 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
|
|
|
1328
1521
|
async sendMghBookingForm(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1329
1522
|
return StoresApiFp(configuration).sendMghBookingForm(options).then((request) => request(axios, basePath));
|
|
1330
1523
|
},
|
|
1524
|
+
/**
|
|
1525
|
+
*
|
|
1526
|
+
* @summary Send new client email
|
|
1527
|
+
* @param {NewClientEmailDto} body
|
|
1528
|
+
* @param {*} [options] Override http request option.
|
|
1529
|
+
* @throws {RequiredError}
|
|
1530
|
+
*/
|
|
1531
|
+
async sendNewClientEmail(body: NewClientEmailDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1532
|
+
return StoresApiFp(configuration).sendNewClientEmail(body, options).then((request) => request(axios, basePath));
|
|
1533
|
+
},
|
|
1331
1534
|
/**
|
|
1332
1535
|
*
|
|
1333
1536
|
* @param {TransferePatientsRequestDto} body
|
|
@@ -1346,6 +1549,16 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
|
|
|
1346
1549
|
async sendRefillEmail(body: RefillRequestDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1347
1550
|
return StoresApiFp(configuration).sendRefillEmail(body, options).then((request) => request(axios, basePath));
|
|
1348
1551
|
},
|
|
1552
|
+
/**
|
|
1553
|
+
*
|
|
1554
|
+
* @summary Send schedule tour email
|
|
1555
|
+
* @param {ScheduleTourEmailDto} body
|
|
1556
|
+
* @param {*} [options] Override http request option.
|
|
1557
|
+
* @throws {RequiredError}
|
|
1558
|
+
*/
|
|
1559
|
+
async sendScheduleTourEmail(body: ScheduleTourEmailDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
1560
|
+
return StoresApiFp(configuration).sendScheduleTourEmail(body, options).then((request) => request(axios, basePath));
|
|
1561
|
+
},
|
|
1349
1562
|
/**
|
|
1350
1563
|
*
|
|
1351
1564
|
* @summary Update refill request by id
|
|
@@ -1521,6 +1734,15 @@ export class StoresApi extends BaseAPI {
|
|
|
1521
1734
|
public async sendGMJoinUsEmail(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1522
1735
|
return StoresApiFp(this.configuration).sendGMJoinUsEmail(options).then((request) => request(this.axios, this.basePath));
|
|
1523
1736
|
}
|
|
1737
|
+
/**
|
|
1738
|
+
*
|
|
1739
|
+
* @param {*} [options] Override http request option.
|
|
1740
|
+
* @throws {RequiredError}
|
|
1741
|
+
* @memberof StoresApi
|
|
1742
|
+
*/
|
|
1743
|
+
public async sendHolyFamilyEmail(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1744
|
+
return StoresApiFp(this.configuration).sendHolyFamilyEmail(options).then((request) => request(this.axios, this.basePath));
|
|
1745
|
+
}
|
|
1524
1746
|
/**
|
|
1525
1747
|
*
|
|
1526
1748
|
* @param {*} [options] Override http request option.
|
|
@@ -1530,6 +1752,17 @@ export class StoresApi extends BaseAPI {
|
|
|
1530
1752
|
public async sendMghBookingForm(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1531
1753
|
return StoresApiFp(this.configuration).sendMghBookingForm(options).then((request) => request(this.axios, this.basePath));
|
|
1532
1754
|
}
|
|
1755
|
+
/**
|
|
1756
|
+
*
|
|
1757
|
+
* @summary Send new client email
|
|
1758
|
+
* @param {NewClientEmailDto} body
|
|
1759
|
+
* @param {*} [options] Override http request option.
|
|
1760
|
+
* @throws {RequiredError}
|
|
1761
|
+
* @memberof StoresApi
|
|
1762
|
+
*/
|
|
1763
|
+
public async sendNewClientEmail(body: NewClientEmailDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1764
|
+
return StoresApiFp(this.configuration).sendNewClientEmail(body, options).then((request) => request(this.axios, this.basePath));
|
|
1765
|
+
}
|
|
1533
1766
|
/**
|
|
1534
1767
|
*
|
|
1535
1768
|
* @param {TransferePatientsRequestDto} body
|
|
@@ -1550,6 +1783,17 @@ export class StoresApi extends BaseAPI {
|
|
|
1550
1783
|
public async sendRefillEmail(body: RefillRequestDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1551
1784
|
return StoresApiFp(this.configuration).sendRefillEmail(body, options).then((request) => request(this.axios, this.basePath));
|
|
1552
1785
|
}
|
|
1786
|
+
/**
|
|
1787
|
+
*
|
|
1788
|
+
* @summary Send schedule tour email
|
|
1789
|
+
* @param {ScheduleTourEmailDto} body
|
|
1790
|
+
* @param {*} [options] Override http request option.
|
|
1791
|
+
* @throws {RequiredError}
|
|
1792
|
+
* @memberof StoresApi
|
|
1793
|
+
*/
|
|
1794
|
+
public async sendScheduleTourEmail(body: ScheduleTourEmailDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
1795
|
+
return StoresApiFp(this.configuration).sendScheduleTourEmail(body, options).then((request) => request(this.axios, this.basePath));
|
|
1796
|
+
}
|
|
1553
1797
|
/**
|
|
1554
1798
|
*
|
|
1555
1799
|
* @summary Update refill request by id
|