hey-pharmacist-ecommerce 1.1.25 → 1.1.27
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 +4 -207
- package/dist/index.d.ts +4 -207
- package/dist/index.js +188 -233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +189 -235
- 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/index.ts +1 -0
- 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 +3 -4
- package/src/screens/CheckoutScreen.tsx +25 -73
- 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,513 +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 { OpenApi } from '../models';
|
|
20
|
-
/**
|
|
21
|
-
* OpenAIApi - axios parameter creator
|
|
22
|
-
* @export
|
|
23
|
-
*/
|
|
24
|
-
export const OpenAIApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
25
|
-
return {
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @summary Generates description for the product from its title
|
|
29
|
-
* @param {OpenApi} body
|
|
30
|
-
* @param {*} [options] Override http request option.
|
|
31
|
-
* @throws {RequiredError}
|
|
32
|
-
*/
|
|
33
|
-
generateProductDescription: async (body: OpenApi, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
34
|
-
// verify required parameter 'body' is not null or undefined
|
|
35
|
-
if (body === null || body === undefined) {
|
|
36
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling generateProductDescription.');
|
|
37
|
-
}
|
|
38
|
-
const localVarPath = `/openai/product-description`;
|
|
39
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
41
|
-
let baseOptions;
|
|
42
|
-
if (configuration) {
|
|
43
|
-
baseOptions = configuration.baseOptions;
|
|
44
|
-
}
|
|
45
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
46
|
-
const localVarHeaderParameter = {} as any;
|
|
47
|
-
const localVarQueryParameter = {} as any;
|
|
48
|
-
|
|
49
|
-
// authentication bearer required
|
|
50
|
-
// http bearer authentication required
|
|
51
|
-
if (configuration && configuration.accessToken) {
|
|
52
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
53
|
-
? await configuration.accessToken()
|
|
54
|
-
: await configuration.accessToken;
|
|
55
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// authentication x-store-key required
|
|
59
|
-
if (configuration && configuration.apiKey) {
|
|
60
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
61
|
-
? await configuration.apiKey("x-store-key")
|
|
62
|
-
: await configuration.apiKey;
|
|
63
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
67
|
-
|
|
68
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
69
|
-
for (const key in localVarQueryParameter) {
|
|
70
|
-
query.set(key, localVarQueryParameter[key]);
|
|
71
|
-
}
|
|
72
|
-
for (const key in options.params) {
|
|
73
|
-
query.set(key, options.params[key]);
|
|
74
|
-
}
|
|
75
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
76
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
78
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
79
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
83
|
-
options: localVarRequestOptions,
|
|
84
|
-
};
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* @summary Generates AI created images for a product from its title + description
|
|
89
|
-
* @param {OpenApi} body
|
|
90
|
-
* @param {*} [options] Override http request option.
|
|
91
|
-
* @throws {RequiredError}
|
|
92
|
-
*/
|
|
93
|
-
generateProductImages: async (body: OpenApi, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
94
|
-
// verify required parameter 'body' is not null or undefined
|
|
95
|
-
if (body === null || body === undefined) {
|
|
96
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling generateProductImages.');
|
|
97
|
-
}
|
|
98
|
-
const localVarPath = `/openai/product-image`;
|
|
99
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
100
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
101
|
-
let baseOptions;
|
|
102
|
-
if (configuration) {
|
|
103
|
-
baseOptions = configuration.baseOptions;
|
|
104
|
-
}
|
|
105
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
106
|
-
const localVarHeaderParameter = {} as any;
|
|
107
|
-
const localVarQueryParameter = {} as any;
|
|
108
|
-
|
|
109
|
-
// authentication bearer required
|
|
110
|
-
// http bearer authentication required
|
|
111
|
-
if (configuration && configuration.accessToken) {
|
|
112
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
113
|
-
? await configuration.accessToken()
|
|
114
|
-
: await configuration.accessToken;
|
|
115
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// authentication x-store-key required
|
|
119
|
-
if (configuration && configuration.apiKey) {
|
|
120
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
121
|
-
? await configuration.apiKey("x-store-key")
|
|
122
|
-
: await configuration.apiKey;
|
|
123
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
127
|
-
|
|
128
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
129
|
-
for (const key in localVarQueryParameter) {
|
|
130
|
-
query.set(key, localVarQueryParameter[key]);
|
|
131
|
-
}
|
|
132
|
-
for (const key in options.params) {
|
|
133
|
-
query.set(key, options.params[key]);
|
|
134
|
-
}
|
|
135
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
136
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
137
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
138
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
139
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
140
|
-
|
|
141
|
-
return {
|
|
142
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
143
|
-
options: localVarRequestOptions,
|
|
144
|
-
};
|
|
145
|
-
},
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
* @summary Generate tags for the product using the product description
|
|
149
|
-
* @param {OpenApi} body
|
|
150
|
-
* @param {*} [options] Override http request option.
|
|
151
|
-
* @throws {RequiredError}
|
|
152
|
-
*/
|
|
153
|
-
getTags: async (body: OpenApi, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
154
|
-
// verify required parameter 'body' is not null or undefined
|
|
155
|
-
if (body === null || body === undefined) {
|
|
156
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling getTags.');
|
|
157
|
-
}
|
|
158
|
-
const localVarPath = `/openai/tags`;
|
|
159
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
160
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
161
|
-
let baseOptions;
|
|
162
|
-
if (configuration) {
|
|
163
|
-
baseOptions = configuration.baseOptions;
|
|
164
|
-
}
|
|
165
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
166
|
-
const localVarHeaderParameter = {} as any;
|
|
167
|
-
const localVarQueryParameter = {} as any;
|
|
168
|
-
|
|
169
|
-
// authentication bearer required
|
|
170
|
-
// http bearer authentication required
|
|
171
|
-
if (configuration && configuration.accessToken) {
|
|
172
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
173
|
-
? await configuration.accessToken()
|
|
174
|
-
: await configuration.accessToken;
|
|
175
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// authentication x-store-key required
|
|
179
|
-
if (configuration && configuration.apiKey) {
|
|
180
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
181
|
-
? await configuration.apiKey("x-store-key")
|
|
182
|
-
: await configuration.apiKey;
|
|
183
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
187
|
-
|
|
188
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
189
|
-
for (const key in localVarQueryParameter) {
|
|
190
|
-
query.set(key, localVarQueryParameter[key]);
|
|
191
|
-
}
|
|
192
|
-
for (const key in options.params) {
|
|
193
|
-
query.set(key, options.params[key]);
|
|
194
|
-
}
|
|
195
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
196
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
197
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
198
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
199
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
200
|
-
|
|
201
|
-
return {
|
|
202
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
203
|
-
options: localVarRequestOptions,
|
|
204
|
-
};
|
|
205
|
-
},
|
|
206
|
-
/**
|
|
207
|
-
*
|
|
208
|
-
* @summary Search for products in the database using Ai
|
|
209
|
-
* @param {string} searchTerm
|
|
210
|
-
* @param {*} [options] Override http request option.
|
|
211
|
-
* @throws {RequiredError}
|
|
212
|
-
*/
|
|
213
|
-
searchProducts: async (searchTerm: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
214
|
-
// verify required parameter 'searchTerm' is not null or undefined
|
|
215
|
-
if (searchTerm === null || searchTerm === undefined) {
|
|
216
|
-
throw new RequiredError('searchTerm','Required parameter searchTerm was null or undefined when calling searchProducts.');
|
|
217
|
-
}
|
|
218
|
-
const localVarPath = `/openai/search`;
|
|
219
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
220
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
221
|
-
let baseOptions;
|
|
222
|
-
if (configuration) {
|
|
223
|
-
baseOptions = configuration.baseOptions;
|
|
224
|
-
}
|
|
225
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
226
|
-
const localVarHeaderParameter = {} as any;
|
|
227
|
-
const localVarQueryParameter = {} as any;
|
|
228
|
-
|
|
229
|
-
// authentication bearer required
|
|
230
|
-
// http bearer authentication required
|
|
231
|
-
if (configuration && configuration.accessToken) {
|
|
232
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
233
|
-
? await configuration.accessToken()
|
|
234
|
-
: await configuration.accessToken;
|
|
235
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// authentication x-store-key required
|
|
239
|
-
if (configuration && configuration.apiKey) {
|
|
240
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
241
|
-
? await configuration.apiKey("x-store-key")
|
|
242
|
-
: await configuration.apiKey;
|
|
243
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (searchTerm !== undefined) {
|
|
247
|
-
localVarQueryParameter['searchTerm'] = searchTerm;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
251
|
-
for (const key in localVarQueryParameter) {
|
|
252
|
-
query.set(key, localVarQueryParameter[key]);
|
|
253
|
-
}
|
|
254
|
-
for (const key in options.params) {
|
|
255
|
-
query.set(key, options.params[key]);
|
|
256
|
-
}
|
|
257
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
258
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
259
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
260
|
-
|
|
261
|
-
return {
|
|
262
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
263
|
-
options: localVarRequestOptions,
|
|
264
|
-
};
|
|
265
|
-
},
|
|
266
|
-
/**
|
|
267
|
-
*
|
|
268
|
-
* @param {*} [options] Override http request option.
|
|
269
|
-
* @throws {RequiredError}
|
|
270
|
-
*/
|
|
271
|
-
tryGenerateEmbedding: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
272
|
-
const localVarPath = `/openai`;
|
|
273
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
274
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
275
|
-
let baseOptions;
|
|
276
|
-
if (configuration) {
|
|
277
|
-
baseOptions = configuration.baseOptions;
|
|
278
|
-
}
|
|
279
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
280
|
-
const localVarHeaderParameter = {} as any;
|
|
281
|
-
const localVarQueryParameter = {} as any;
|
|
282
|
-
|
|
283
|
-
// authentication bearer required
|
|
284
|
-
// http bearer authentication required
|
|
285
|
-
if (configuration && configuration.accessToken) {
|
|
286
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
287
|
-
? await configuration.accessToken()
|
|
288
|
-
: await configuration.accessToken;
|
|
289
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// authentication x-store-key required
|
|
293
|
-
if (configuration && configuration.apiKey) {
|
|
294
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
295
|
-
? await configuration.apiKey("x-store-key")
|
|
296
|
-
: await configuration.apiKey;
|
|
297
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
301
|
-
for (const key in localVarQueryParameter) {
|
|
302
|
-
query.set(key, localVarQueryParameter[key]);
|
|
303
|
-
}
|
|
304
|
-
for (const key in options.params) {
|
|
305
|
-
query.set(key, options.params[key]);
|
|
306
|
-
}
|
|
307
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
308
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
309
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
310
|
-
|
|
311
|
-
return {
|
|
312
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
313
|
-
options: localVarRequestOptions,
|
|
314
|
-
};
|
|
315
|
-
},
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* OpenAIApi - functional programming interface
|
|
321
|
-
* @export
|
|
322
|
-
*/
|
|
323
|
-
export const OpenAIApiFp = function(configuration?: Configuration) {
|
|
324
|
-
return {
|
|
325
|
-
/**
|
|
326
|
-
*
|
|
327
|
-
* @summary Generates description for the product from its title
|
|
328
|
-
* @param {OpenApi} body
|
|
329
|
-
* @param {*} [options] Override http request option.
|
|
330
|
-
* @throws {RequiredError}
|
|
331
|
-
*/
|
|
332
|
-
async generateProductDescription(body: OpenApi, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
333
|
-
const localVarAxiosArgs = await OpenAIApiAxiosParamCreator(configuration).generateProductDescription(body, options);
|
|
334
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
335
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
336
|
-
return axios.request(axiosRequestArgs);
|
|
337
|
-
};
|
|
338
|
-
},
|
|
339
|
-
/**
|
|
340
|
-
*
|
|
341
|
-
* @summary Generates AI created images for a product from its title + description
|
|
342
|
-
* @param {OpenApi} body
|
|
343
|
-
* @param {*} [options] Override http request option.
|
|
344
|
-
* @throws {RequiredError}
|
|
345
|
-
*/
|
|
346
|
-
async generateProductImages(body: OpenApi, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
347
|
-
const localVarAxiosArgs = await OpenAIApiAxiosParamCreator(configuration).generateProductImages(body, options);
|
|
348
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
349
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
350
|
-
return axios.request(axiosRequestArgs);
|
|
351
|
-
};
|
|
352
|
-
},
|
|
353
|
-
/**
|
|
354
|
-
*
|
|
355
|
-
* @summary Generate tags for the product using the product description
|
|
356
|
-
* @param {OpenApi} body
|
|
357
|
-
* @param {*} [options] Override http request option.
|
|
358
|
-
* @throws {RequiredError}
|
|
359
|
-
*/
|
|
360
|
-
async getTags(body: OpenApi, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
361
|
-
const localVarAxiosArgs = await OpenAIApiAxiosParamCreator(configuration).getTags(body, options);
|
|
362
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
363
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
364
|
-
return axios.request(axiosRequestArgs);
|
|
365
|
-
};
|
|
366
|
-
},
|
|
367
|
-
/**
|
|
368
|
-
*
|
|
369
|
-
* @summary Search for products in the database using Ai
|
|
370
|
-
* @param {string} searchTerm
|
|
371
|
-
* @param {*} [options] Override http request option.
|
|
372
|
-
* @throws {RequiredError}
|
|
373
|
-
*/
|
|
374
|
-
async searchProducts(searchTerm: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
375
|
-
const localVarAxiosArgs = await OpenAIApiAxiosParamCreator(configuration).searchProducts(searchTerm, options);
|
|
376
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
377
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
378
|
-
return axios.request(axiosRequestArgs);
|
|
379
|
-
};
|
|
380
|
-
},
|
|
381
|
-
/**
|
|
382
|
-
*
|
|
383
|
-
* @param {*} [options] Override http request option.
|
|
384
|
-
* @throws {RequiredError}
|
|
385
|
-
*/
|
|
386
|
-
async tryGenerateEmbedding(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
387
|
-
const localVarAxiosArgs = await OpenAIApiAxiosParamCreator(configuration).tryGenerateEmbedding(options);
|
|
388
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
389
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
390
|
-
return axios.request(axiosRequestArgs);
|
|
391
|
-
};
|
|
392
|
-
},
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* OpenAIApi - factory interface
|
|
398
|
-
* @export
|
|
399
|
-
*/
|
|
400
|
-
export const OpenAIApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
401
|
-
return {
|
|
402
|
-
/**
|
|
403
|
-
*
|
|
404
|
-
* @summary Generates description for the product from its title
|
|
405
|
-
* @param {OpenApi} body
|
|
406
|
-
* @param {*} [options] Override http request option.
|
|
407
|
-
* @throws {RequiredError}
|
|
408
|
-
*/
|
|
409
|
-
async generateProductDescription(body: OpenApi, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
410
|
-
return OpenAIApiFp(configuration).generateProductDescription(body, options).then((request) => request(axios, basePath));
|
|
411
|
-
},
|
|
412
|
-
/**
|
|
413
|
-
*
|
|
414
|
-
* @summary Generates AI created images for a product from its title + description
|
|
415
|
-
* @param {OpenApi} body
|
|
416
|
-
* @param {*} [options] Override http request option.
|
|
417
|
-
* @throws {RequiredError}
|
|
418
|
-
*/
|
|
419
|
-
async generateProductImages(body: OpenApi, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
420
|
-
return OpenAIApiFp(configuration).generateProductImages(body, options).then((request) => request(axios, basePath));
|
|
421
|
-
},
|
|
422
|
-
/**
|
|
423
|
-
*
|
|
424
|
-
* @summary Generate tags for the product using the product description
|
|
425
|
-
* @param {OpenApi} body
|
|
426
|
-
* @param {*} [options] Override http request option.
|
|
427
|
-
* @throws {RequiredError}
|
|
428
|
-
*/
|
|
429
|
-
async getTags(body: OpenApi, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
430
|
-
return OpenAIApiFp(configuration).getTags(body, options).then((request) => request(axios, basePath));
|
|
431
|
-
},
|
|
432
|
-
/**
|
|
433
|
-
*
|
|
434
|
-
* @summary Search for products in the database using Ai
|
|
435
|
-
* @param {string} searchTerm
|
|
436
|
-
* @param {*} [options] Override http request option.
|
|
437
|
-
* @throws {RequiredError}
|
|
438
|
-
*/
|
|
439
|
-
async searchProducts(searchTerm: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
440
|
-
return OpenAIApiFp(configuration).searchProducts(searchTerm, options).then((request) => request(axios, basePath));
|
|
441
|
-
},
|
|
442
|
-
/**
|
|
443
|
-
*
|
|
444
|
-
* @param {*} [options] Override http request option.
|
|
445
|
-
* @throws {RequiredError}
|
|
446
|
-
*/
|
|
447
|
-
async tryGenerateEmbedding(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
448
|
-
return OpenAIApiFp(configuration).tryGenerateEmbedding(options).then((request) => request(axios, basePath));
|
|
449
|
-
},
|
|
450
|
-
};
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* OpenAIApi - object-oriented interface
|
|
455
|
-
* @export
|
|
456
|
-
* @class OpenAIApi
|
|
457
|
-
* @extends {BaseAPI}
|
|
458
|
-
*/
|
|
459
|
-
export class OpenAIApi extends BaseAPI {
|
|
460
|
-
/**
|
|
461
|
-
*
|
|
462
|
-
* @summary Generates description for the product from its title
|
|
463
|
-
* @param {OpenApi} body
|
|
464
|
-
* @param {*} [options] Override http request option.
|
|
465
|
-
* @throws {RequiredError}
|
|
466
|
-
* @memberof OpenAIApi
|
|
467
|
-
*/
|
|
468
|
-
public async generateProductDescription(body: OpenApi, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
469
|
-
return OpenAIApiFp(this.configuration).generateProductDescription(body, options).then((request) => request(this.axios, this.basePath));
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
*
|
|
473
|
-
* @summary Generates AI created images for a product from its title + description
|
|
474
|
-
* @param {OpenApi} body
|
|
475
|
-
* @param {*} [options] Override http request option.
|
|
476
|
-
* @throws {RequiredError}
|
|
477
|
-
* @memberof OpenAIApi
|
|
478
|
-
*/
|
|
479
|
-
public async generateProductImages(body: OpenApi, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
480
|
-
return OpenAIApiFp(this.configuration).generateProductImages(body, options).then((request) => request(this.axios, this.basePath));
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
*
|
|
484
|
-
* @summary Generate tags for the product using the product description
|
|
485
|
-
* @param {OpenApi} body
|
|
486
|
-
* @param {*} [options] Override http request option.
|
|
487
|
-
* @throws {RequiredError}
|
|
488
|
-
* @memberof OpenAIApi
|
|
489
|
-
*/
|
|
490
|
-
public async getTags(body: OpenApi, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
491
|
-
return OpenAIApiFp(this.configuration).getTags(body, options).then((request) => request(this.axios, this.basePath));
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
*
|
|
495
|
-
* @summary Search for products in the database using Ai
|
|
496
|
-
* @param {string} searchTerm
|
|
497
|
-
* @param {*} [options] Override http request option.
|
|
498
|
-
* @throws {RequiredError}
|
|
499
|
-
* @memberof OpenAIApi
|
|
500
|
-
*/
|
|
501
|
-
public async searchProducts(searchTerm: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
502
|
-
return OpenAIApiFp(this.configuration).searchProducts(searchTerm, options).then((request) => request(this.axios, this.basePath));
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
*
|
|
506
|
-
* @param {*} [options] Override http request option.
|
|
507
|
-
* @throws {RequiredError}
|
|
508
|
-
* @memberof OpenAIApi
|
|
509
|
-
*/
|
|
510
|
-
public async tryGenerateEmbedding(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
511
|
-
return OpenAIApiFp(this.configuration).tryGenerateEmbedding(options).then((request) => request(this.axios, this.basePath));
|
|
512
|
-
}
|
|
513
|
-
}
|