hey-pharmacist-ecommerce 1.1.24 → 1.1.26
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 +1 -206
- package/dist/index.d.ts +1 -206
- package/dist/index.js +48 -234
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +48 -234
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/CartItem.tsx +0 -10
- package/src/components/ProductCard.tsx +4 -5
- package/src/lib/Apis/api.ts +0 -8
- package/src/lib/Apis/apis/product-variants-api.ts +0 -96
- package/src/lib/Apis/apis/products-api.ts +7 -15
- package/src/lib/Apis/apis/shipping-api.ts +12 -214
- package/src/lib/Apis/models/category-filters.ts +0 -6
- package/src/lib/Apis/models/create-variant-dto.ts +0 -6
- package/src/lib/Apis/models/discounts-insights-dto.ts +0 -6
- package/src/lib/Apis/models/index.ts +0 -29
- package/src/lib/Apis/models/orders-insights-dto.ts +0 -6
- package/src/lib/Apis/models/payment.ts +0 -7
- package/src/lib/Apis/models/product-variant.ts +0 -6
- package/src/lib/Apis/models/products-insights-dto.ts +0 -6
- package/src/lib/Apis/models/rate-dto.ts +0 -6
- package/src/lib/Apis/models/update-product-variant-dto.ts +0 -6
- package/src/providers/WishlistProvider.tsx +2 -3
- package/src/screens/CheckoutScreen.tsx +26 -74
- package/src/lib/Apis/apis/chats-api.ts +0 -1101
- package/src/lib/Apis/apis/drafts-api.ts +0 -448
- package/src/lib/Apis/apis/open-aiapi.ts +0 -513
- package/src/lib/Apis/apis/payment-methods-api.ts +0 -411
- package/src/lib/Apis/apis/product-attributes-api.ts +0 -538
- package/src/lib/Apis/apis/product-favorite-list-api.ts +0 -321
- package/src/lib/Apis/apis/roles-api.ts +0 -614
- package/src/lib/Apis/apis/statistics-api.ts +0 -234
- package/src/lib/Apis/models/add-message-dto.ts +0 -56
- package/src/lib/Apis/models/chat.ts +0 -33
- package/src/lib/Apis/models/create-chat-dto.ts +0 -39
- package/src/lib/Apis/models/create-draft-dto.ts +0 -67
- package/src/lib/Apis/models/create-product-attribute-dto.ts +0 -33
- package/src/lib/Apis/models/create-role-dto.ts +0 -57
- package/src/lib/Apis/models/create-zone-dto.ts +0 -82
- package/src/lib/Apis/models/default-payment-method-request-dto.ts +0 -27
- package/src/lib/Apis/models/draft.ts +0 -79
- package/src/lib/Apis/models/google-analytics-request-dto.ts +0 -55
- package/src/lib/Apis/models/google-analytics-response-dto.ts +0 -39
- package/src/lib/Apis/models/my-favorite-list-dto.ts +0 -52
- package/src/lib/Apis/models/open-api.ts +0 -33
- package/src/lib/Apis/models/payment-method-data.ts +0 -34
- package/src/lib/Apis/models/payment-method.ts +0 -51
- package/src/lib/Apis/models/populated-chat-dto.ts +0 -95
- package/src/lib/Apis/models/product-attribute.ts +0 -57
- package/src/lib/Apis/models/product.ts +0 -142
- package/src/lib/Apis/models/role.ts +0 -69
- package/src/lib/Apis/models/single-message-populated.ts +0 -59
- package/src/lib/Apis/models/single-suggest-attribute.ts +0 -33
- package/src/lib/Apis/models/statistic-dto.ts +0 -171
- package/src/lib/Apis/models/suggest-attributes.ts +0 -28
- package/src/lib/Apis/models/update-product-attribute-dto.ts +0 -33
- package/src/lib/Apis/models/update-role-dto.ts +0 -57
- package/src/lib/Apis/models/update-zone-dto.ts +0 -82
- package/src/lib/Apis/models/user.ts +0 -232
- package/src/lib/Apis/models/zone-single-size.ts +0 -51
- package/src/lib/Apis/models/zone.ts +0 -106
|
@@ -1,321 +0,0 @@
|
|
|
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 { MyFavoriteListDTO } from '../models';
|
|
20
|
-
/**
|
|
21
|
-
* ProductFavoriteListApi - axios parameter creator
|
|
22
|
-
* @export
|
|
23
|
-
*/
|
|
24
|
-
export const ProductFavoriteListApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
25
|
-
return {
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @summary Add product to favorite list
|
|
29
|
-
* @param {string} productId
|
|
30
|
-
* @param {*} [options] Override http request option.
|
|
31
|
-
* @throws {RequiredError}
|
|
32
|
-
*/
|
|
33
|
-
addProductToFavoriteList: async (productId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
34
|
-
// verify required parameter 'productId' is not null or undefined
|
|
35
|
-
if (productId === null || productId === undefined) {
|
|
36
|
-
throw new RequiredError('productId','Required parameter productId was null or undefined when calling addProductToFavoriteList.');
|
|
37
|
-
}
|
|
38
|
-
const localVarPath = `/product-favorite-list/add-product/{productId}`
|
|
39
|
-
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
40
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
42
|
-
let baseOptions;
|
|
43
|
-
if (configuration) {
|
|
44
|
-
baseOptions = configuration.baseOptions;
|
|
45
|
-
}
|
|
46
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
47
|
-
const localVarHeaderParameter = {} as any;
|
|
48
|
-
const localVarQueryParameter = {} as any;
|
|
49
|
-
|
|
50
|
-
// authentication bearer required
|
|
51
|
-
// http bearer authentication required
|
|
52
|
-
if (configuration && configuration.accessToken) {
|
|
53
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
54
|
-
? await configuration.accessToken()
|
|
55
|
-
: await configuration.accessToken;
|
|
56
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// authentication x-store-key required
|
|
60
|
-
if (configuration && configuration.apiKey) {
|
|
61
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
62
|
-
? await configuration.apiKey("x-store-key")
|
|
63
|
-
: await configuration.apiKey;
|
|
64
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
68
|
-
for (const key in localVarQueryParameter) {
|
|
69
|
-
query.set(key, localVarQueryParameter[key]);
|
|
70
|
-
}
|
|
71
|
-
for (const key in options.params) {
|
|
72
|
-
query.set(key, options.params[key]);
|
|
73
|
-
}
|
|
74
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
75
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
77
|
-
|
|
78
|
-
return {
|
|
79
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
80
|
-
options: localVarRequestOptions,
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @summary Get my favorite list
|
|
86
|
-
* @param {*} [options] Override http request option.
|
|
87
|
-
* @throws {RequiredError}
|
|
88
|
-
*/
|
|
89
|
-
getMyFavoriteList: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
90
|
-
const localVarPath = `/product-favorite-list/mine`;
|
|
91
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
92
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
93
|
-
let baseOptions;
|
|
94
|
-
if (configuration) {
|
|
95
|
-
baseOptions = configuration.baseOptions;
|
|
96
|
-
}
|
|
97
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
98
|
-
const localVarHeaderParameter = {} as any;
|
|
99
|
-
const localVarQueryParameter = {} as any;
|
|
100
|
-
|
|
101
|
-
// authentication bearer required
|
|
102
|
-
// http bearer authentication required
|
|
103
|
-
if (configuration && configuration.accessToken) {
|
|
104
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
105
|
-
? await configuration.accessToken()
|
|
106
|
-
: await configuration.accessToken;
|
|
107
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// authentication x-store-key required
|
|
111
|
-
if (configuration && configuration.apiKey) {
|
|
112
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
113
|
-
? await configuration.apiKey("x-store-key")
|
|
114
|
-
: await configuration.apiKey;
|
|
115
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
119
|
-
for (const key in localVarQueryParameter) {
|
|
120
|
-
query.set(key, localVarQueryParameter[key]);
|
|
121
|
-
}
|
|
122
|
-
for (const key in options.params) {
|
|
123
|
-
query.set(key, options.params[key]);
|
|
124
|
-
}
|
|
125
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
126
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
127
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
128
|
-
|
|
129
|
-
return {
|
|
130
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
131
|
-
options: localVarRequestOptions,
|
|
132
|
-
};
|
|
133
|
-
},
|
|
134
|
-
/**
|
|
135
|
-
*
|
|
136
|
-
* @summary Remove product from favorite list
|
|
137
|
-
* @param {string} productId
|
|
138
|
-
* @param {*} [options] Override http request option.
|
|
139
|
-
* @throws {RequiredError}
|
|
140
|
-
*/
|
|
141
|
-
removeProductFromFavoriteList: async (productId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
142
|
-
// verify required parameter 'productId' is not null or undefined
|
|
143
|
-
if (productId === null || productId === undefined) {
|
|
144
|
-
throw new RequiredError('productId','Required parameter productId was null or undefined when calling removeProductFromFavoriteList.');
|
|
145
|
-
}
|
|
146
|
-
const localVarPath = `/product-favorite-list/remove-product/{productId}`
|
|
147
|
-
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
148
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
149
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
150
|
-
let baseOptions;
|
|
151
|
-
if (configuration) {
|
|
152
|
-
baseOptions = configuration.baseOptions;
|
|
153
|
-
}
|
|
154
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
155
|
-
const localVarHeaderParameter = {} as any;
|
|
156
|
-
const localVarQueryParameter = {} as any;
|
|
157
|
-
|
|
158
|
-
// authentication bearer required
|
|
159
|
-
// http bearer authentication required
|
|
160
|
-
if (configuration && configuration.accessToken) {
|
|
161
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
162
|
-
? await configuration.accessToken()
|
|
163
|
-
: await configuration.accessToken;
|
|
164
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// authentication x-store-key required
|
|
168
|
-
if (configuration && configuration.apiKey) {
|
|
169
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
170
|
-
? await configuration.apiKey("x-store-key")
|
|
171
|
-
: await configuration.apiKey;
|
|
172
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
176
|
-
for (const key in localVarQueryParameter) {
|
|
177
|
-
query.set(key, localVarQueryParameter[key]);
|
|
178
|
-
}
|
|
179
|
-
for (const key in options.params) {
|
|
180
|
-
query.set(key, options.params[key]);
|
|
181
|
-
}
|
|
182
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
183
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
184
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
185
|
-
|
|
186
|
-
return {
|
|
187
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
188
|
-
options: localVarRequestOptions,
|
|
189
|
-
};
|
|
190
|
-
},
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* ProductFavoriteListApi - functional programming interface
|
|
196
|
-
* @export
|
|
197
|
-
*/
|
|
198
|
-
export const ProductFavoriteListApiFp = function(configuration?: Configuration) {
|
|
199
|
-
return {
|
|
200
|
-
/**
|
|
201
|
-
*
|
|
202
|
-
* @summary Add product to favorite list
|
|
203
|
-
* @param {string} productId
|
|
204
|
-
* @param {*} [options] Override http request option.
|
|
205
|
-
* @throws {RequiredError}
|
|
206
|
-
*/
|
|
207
|
-
async addProductToFavoriteList(productId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MyFavoriteListDTO>>> {
|
|
208
|
-
const localVarAxiosArgs = await ProductFavoriteListApiAxiosParamCreator(configuration).addProductToFavoriteList(productId, options);
|
|
209
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
210
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
211
|
-
return axios.request(axiosRequestArgs);
|
|
212
|
-
};
|
|
213
|
-
},
|
|
214
|
-
/**
|
|
215
|
-
*
|
|
216
|
-
* @summary Get my favorite list
|
|
217
|
-
* @param {*} [options] Override http request option.
|
|
218
|
-
* @throws {RequiredError}
|
|
219
|
-
*/
|
|
220
|
-
async getMyFavoriteList(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<MyFavoriteListDTO>>>> {
|
|
221
|
-
const localVarAxiosArgs = await ProductFavoriteListApiAxiosParamCreator(configuration).getMyFavoriteList(options);
|
|
222
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
223
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
224
|
-
return axios.request(axiosRequestArgs);
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
/**
|
|
228
|
-
*
|
|
229
|
-
* @summary Remove product from favorite list
|
|
230
|
-
* @param {string} productId
|
|
231
|
-
* @param {*} [options] Override http request option.
|
|
232
|
-
* @throws {RequiredError}
|
|
233
|
-
*/
|
|
234
|
-
async removeProductFromFavoriteList(productId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MyFavoriteListDTO>>> {
|
|
235
|
-
const localVarAxiosArgs = await ProductFavoriteListApiAxiosParamCreator(configuration).removeProductFromFavoriteList(productId, options);
|
|
236
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
237
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
238
|
-
return axios.request(axiosRequestArgs);
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* ProductFavoriteListApi - factory interface
|
|
246
|
-
* @export
|
|
247
|
-
*/
|
|
248
|
-
export const ProductFavoriteListApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
249
|
-
return {
|
|
250
|
-
/**
|
|
251
|
-
*
|
|
252
|
-
* @summary Add product to favorite list
|
|
253
|
-
* @param {string} productId
|
|
254
|
-
* @param {*} [options] Override http request option.
|
|
255
|
-
* @throws {RequiredError}
|
|
256
|
-
*/
|
|
257
|
-
async addProductToFavoriteList(productId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MyFavoriteListDTO>> {
|
|
258
|
-
return ProductFavoriteListApiFp(configuration).addProductToFavoriteList(productId, options).then((request) => request(axios, basePath));
|
|
259
|
-
},
|
|
260
|
-
/**
|
|
261
|
-
*
|
|
262
|
-
* @summary Get my favorite list
|
|
263
|
-
* @param {*} [options] Override http request option.
|
|
264
|
-
* @throws {RequiredError}
|
|
265
|
-
*/
|
|
266
|
-
async getMyFavoriteList(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<MyFavoriteListDTO>>> {
|
|
267
|
-
return ProductFavoriteListApiFp(configuration).getMyFavoriteList(options).then((request) => request(axios, basePath));
|
|
268
|
-
},
|
|
269
|
-
/**
|
|
270
|
-
*
|
|
271
|
-
* @summary Remove product from favorite list
|
|
272
|
-
* @param {string} productId
|
|
273
|
-
* @param {*} [options] Override http request option.
|
|
274
|
-
* @throws {RequiredError}
|
|
275
|
-
*/
|
|
276
|
-
async removeProductFromFavoriteList(productId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MyFavoriteListDTO>> {
|
|
277
|
-
return ProductFavoriteListApiFp(configuration).removeProductFromFavoriteList(productId, options).then((request) => request(axios, basePath));
|
|
278
|
-
},
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* ProductFavoriteListApi - object-oriented interface
|
|
284
|
-
* @export
|
|
285
|
-
* @class ProductFavoriteListApi
|
|
286
|
-
* @extends {BaseAPI}
|
|
287
|
-
*/
|
|
288
|
-
export class ProductFavoriteListApi extends BaseAPI {
|
|
289
|
-
/**
|
|
290
|
-
*
|
|
291
|
-
* @summary Add product to favorite list
|
|
292
|
-
* @param {string} productId
|
|
293
|
-
* @param {*} [options] Override http request option.
|
|
294
|
-
* @throws {RequiredError}
|
|
295
|
-
* @memberof ProductFavoriteListApi
|
|
296
|
-
*/
|
|
297
|
-
public async addProductToFavoriteList(productId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<MyFavoriteListDTO>> {
|
|
298
|
-
return ProductFavoriteListApiFp(this.configuration).addProductToFavoriteList(productId, options).then((request) => request(this.axios, this.basePath));
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
*
|
|
302
|
-
* @summary Get my favorite list
|
|
303
|
-
* @param {*} [options] Override http request option.
|
|
304
|
-
* @throws {RequiredError}
|
|
305
|
-
* @memberof ProductFavoriteListApi
|
|
306
|
-
*/
|
|
307
|
-
public async getMyFavoriteList(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<MyFavoriteListDTO>>> {
|
|
308
|
-
return ProductFavoriteListApiFp(this.configuration).getMyFavoriteList(options).then((request) => request(this.axios, this.basePath));
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
*
|
|
312
|
-
* @summary Remove product from favorite list
|
|
313
|
-
* @param {string} productId
|
|
314
|
-
* @param {*} [options] Override http request option.
|
|
315
|
-
* @throws {RequiredError}
|
|
316
|
-
* @memberof ProductFavoriteListApi
|
|
317
|
-
*/
|
|
318
|
-
public async removeProductFromFavoriteList(productId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<MyFavoriteListDTO>> {
|
|
319
|
-
return ProductFavoriteListApiFp(this.configuration).removeProductFromFavoriteList(productId, options).then((request) => request(this.axios, this.basePath));
|
|
320
|
-
}
|
|
321
|
-
}
|