hey-pharmacist-ecommerce 1.1.25 → 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 +47 -233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -233
- 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 +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,448 +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 { CreateDraftDto } from '../models';
|
|
20
|
-
import { Draft } from '../models';
|
|
21
|
-
/**
|
|
22
|
-
* DraftsApi - axios parameter creator
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
|
-
export const DraftsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
26
|
-
return {
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @summary Create a new draft
|
|
30
|
-
* @param {CreateDraftDto} body
|
|
31
|
-
* @param {*} [options] Override http request option.
|
|
32
|
-
* @throws {RequiredError}
|
|
33
|
-
*/
|
|
34
|
-
createDraft: async (body: CreateDraftDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35
|
-
// verify required parameter 'body' is not null or undefined
|
|
36
|
-
if (body === null || body === undefined) {
|
|
37
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling createDraft.');
|
|
38
|
-
}
|
|
39
|
-
const localVarPath = `/drafts`;
|
|
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
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
51
|
-
|
|
52
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
53
|
-
for (const key in localVarQueryParameter) {
|
|
54
|
-
query.set(key, localVarQueryParameter[key]);
|
|
55
|
-
}
|
|
56
|
-
for (const key in options.params) {
|
|
57
|
-
query.set(key, options.params[key]);
|
|
58
|
-
}
|
|
59
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
60
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
62
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
63
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
67
|
-
options: localVarRequestOptions,
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @summary Delete a draft
|
|
73
|
-
* @param {string} id
|
|
74
|
-
* @param {*} [options] Override http request option.
|
|
75
|
-
* @throws {RequiredError}
|
|
76
|
-
*/
|
|
77
|
-
deleteDraft: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
78
|
-
// verify required parameter 'id' is not null or undefined
|
|
79
|
-
if (id === null || id === undefined) {
|
|
80
|
-
throw new RequiredError('id','Required parameter id was null or undefined when calling deleteDraft.');
|
|
81
|
-
}
|
|
82
|
-
const localVarPath = `/drafts/{id}`
|
|
83
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
84
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
85
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
86
|
-
let baseOptions;
|
|
87
|
-
if (configuration) {
|
|
88
|
-
baseOptions = configuration.baseOptions;
|
|
89
|
-
}
|
|
90
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
|
|
91
|
-
const localVarHeaderParameter = {} as any;
|
|
92
|
-
const localVarQueryParameter = {} as any;
|
|
93
|
-
|
|
94
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
95
|
-
for (const key in localVarQueryParameter) {
|
|
96
|
-
query.set(key, localVarQueryParameter[key]);
|
|
97
|
-
}
|
|
98
|
-
for (const key in options.params) {
|
|
99
|
-
query.set(key, options.params[key]);
|
|
100
|
-
}
|
|
101
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
102
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
103
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
107
|
-
options: localVarRequestOptions,
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
/**
|
|
111
|
-
*
|
|
112
|
-
* @summary Get a draft by ID
|
|
113
|
-
* @param {string} id
|
|
114
|
-
* @param {*} [options] Override http request option.
|
|
115
|
-
* @throws {RequiredError}
|
|
116
|
-
*/
|
|
117
|
-
getDraftById: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
118
|
-
// verify required parameter 'id' is not null or undefined
|
|
119
|
-
if (id === null || id === undefined) {
|
|
120
|
-
throw new RequiredError('id','Required parameter id was null or undefined when calling getDraftById.');
|
|
121
|
-
}
|
|
122
|
-
const localVarPath = `/drafts/{id}`
|
|
123
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
124
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
125
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
126
|
-
let baseOptions;
|
|
127
|
-
if (configuration) {
|
|
128
|
-
baseOptions = configuration.baseOptions;
|
|
129
|
-
}
|
|
130
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
131
|
-
const localVarHeaderParameter = {} as any;
|
|
132
|
-
const localVarQueryParameter = {} as any;
|
|
133
|
-
|
|
134
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
135
|
-
for (const key in localVarQueryParameter) {
|
|
136
|
-
query.set(key, localVarQueryParameter[key]);
|
|
137
|
-
}
|
|
138
|
-
for (const key in options.params) {
|
|
139
|
-
query.set(key, options.params[key]);
|
|
140
|
-
}
|
|
141
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
142
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
143
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
144
|
-
|
|
145
|
-
return {
|
|
146
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
147
|
-
options: localVarRequestOptions,
|
|
148
|
-
};
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* Retrieve all drafts based on their categories. This function serves both regular customers and administrative dashboards. For admin-specific purposes, set isAdminDraft to true and specify the category without requiring a user ID. For regular customers, set isAdminDraft to false and include the category along with the user ID.
|
|
152
|
-
* @summary Get all drafts
|
|
153
|
-
* @param {string} [userId]
|
|
154
|
-
* @param {string} [category]
|
|
155
|
-
* @param {boolean} [isAdminDraft]
|
|
156
|
-
* @param {*} [options] Override http request option.
|
|
157
|
-
* @throws {RequiredError}
|
|
158
|
-
*/
|
|
159
|
-
getDraftsByCategory: async (userId?: string, category?: string, isAdminDraft?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
160
|
-
const localVarPath = `/drafts`;
|
|
161
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
162
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
163
|
-
let baseOptions;
|
|
164
|
-
if (configuration) {
|
|
165
|
-
baseOptions = configuration.baseOptions;
|
|
166
|
-
}
|
|
167
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
168
|
-
const localVarHeaderParameter = {} as any;
|
|
169
|
-
const localVarQueryParameter = {} as any;
|
|
170
|
-
|
|
171
|
-
if (userId !== undefined) {
|
|
172
|
-
localVarQueryParameter['userId'] = userId;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if (category !== undefined) {
|
|
176
|
-
localVarQueryParameter['category'] = category;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (isAdminDraft !== undefined) {
|
|
180
|
-
localVarQueryParameter['isAdminDraft'] = isAdminDraft;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
184
|
-
for (const key in localVarQueryParameter) {
|
|
185
|
-
query.set(key, localVarQueryParameter[key]);
|
|
186
|
-
}
|
|
187
|
-
for (const key in options.params) {
|
|
188
|
-
query.set(key, options.params[key]);
|
|
189
|
-
}
|
|
190
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
191
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
192
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
193
|
-
|
|
194
|
-
return {
|
|
195
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
196
|
-
options: localVarRequestOptions,
|
|
197
|
-
};
|
|
198
|
-
},
|
|
199
|
-
/**
|
|
200
|
-
*
|
|
201
|
-
* @summary Update a draft
|
|
202
|
-
* @param {string} id
|
|
203
|
-
* @param {*} [options] Override http request option.
|
|
204
|
-
* @throws {RequiredError}
|
|
205
|
-
*/
|
|
206
|
-
updateDraft: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
207
|
-
// verify required parameter 'id' is not null or undefined
|
|
208
|
-
if (id === null || id === undefined) {
|
|
209
|
-
throw new RequiredError('id','Required parameter id was null or undefined when calling updateDraft.');
|
|
210
|
-
}
|
|
211
|
-
const localVarPath = `/drafts/{id}`
|
|
212
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
213
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
214
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
215
|
-
let baseOptions;
|
|
216
|
-
if (configuration) {
|
|
217
|
-
baseOptions = configuration.baseOptions;
|
|
218
|
-
}
|
|
219
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options};
|
|
220
|
-
const localVarHeaderParameter = {} as any;
|
|
221
|
-
const localVarQueryParameter = {} as any;
|
|
222
|
-
|
|
223
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
224
|
-
for (const key in localVarQueryParameter) {
|
|
225
|
-
query.set(key, localVarQueryParameter[key]);
|
|
226
|
-
}
|
|
227
|
-
for (const key in options.params) {
|
|
228
|
-
query.set(key, options.params[key]);
|
|
229
|
-
}
|
|
230
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
231
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
233
|
-
|
|
234
|
-
return {
|
|
235
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
236
|
-
options: localVarRequestOptions,
|
|
237
|
-
};
|
|
238
|
-
},
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* DraftsApi - functional programming interface
|
|
244
|
-
* @export
|
|
245
|
-
*/
|
|
246
|
-
export const DraftsApiFp = function(configuration?: Configuration) {
|
|
247
|
-
return {
|
|
248
|
-
/**
|
|
249
|
-
*
|
|
250
|
-
* @summary Create a new draft
|
|
251
|
-
* @param {CreateDraftDto} body
|
|
252
|
-
* @param {*} [options] Override http request option.
|
|
253
|
-
* @throws {RequiredError}
|
|
254
|
-
*/
|
|
255
|
-
async createDraft(body: CreateDraftDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Draft>>> {
|
|
256
|
-
const localVarAxiosArgs = await DraftsApiAxiosParamCreator(configuration).createDraft(body, options);
|
|
257
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
258
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
259
|
-
return axios.request(axiosRequestArgs);
|
|
260
|
-
};
|
|
261
|
-
},
|
|
262
|
-
/**
|
|
263
|
-
*
|
|
264
|
-
* @summary Delete a draft
|
|
265
|
-
* @param {string} id
|
|
266
|
-
* @param {*} [options] Override http request option.
|
|
267
|
-
* @throws {RequiredError}
|
|
268
|
-
*/
|
|
269
|
-
async deleteDraft(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
270
|
-
const localVarAxiosArgs = await DraftsApiAxiosParamCreator(configuration).deleteDraft(id, options);
|
|
271
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
272
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
273
|
-
return axios.request(axiosRequestArgs);
|
|
274
|
-
};
|
|
275
|
-
},
|
|
276
|
-
/**
|
|
277
|
-
*
|
|
278
|
-
* @summary Get a draft by ID
|
|
279
|
-
* @param {string} id
|
|
280
|
-
* @param {*} [options] Override http request option.
|
|
281
|
-
* @throws {RequiredError}
|
|
282
|
-
*/
|
|
283
|
-
async getDraftById(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Draft>>> {
|
|
284
|
-
const localVarAxiosArgs = await DraftsApiAxiosParamCreator(configuration).getDraftById(id, options);
|
|
285
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
286
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
287
|
-
return axios.request(axiosRequestArgs);
|
|
288
|
-
};
|
|
289
|
-
},
|
|
290
|
-
/**
|
|
291
|
-
* Retrieve all drafts based on their categories. This function serves both regular customers and administrative dashboards. For admin-specific purposes, set isAdminDraft to true and specify the category without requiring a user ID. For regular customers, set isAdminDraft to false and include the category along with the user ID.
|
|
292
|
-
* @summary Get all drafts
|
|
293
|
-
* @param {string} [userId]
|
|
294
|
-
* @param {string} [category]
|
|
295
|
-
* @param {boolean} [isAdminDraft]
|
|
296
|
-
* @param {*} [options] Override http request option.
|
|
297
|
-
* @throws {RequiredError}
|
|
298
|
-
*/
|
|
299
|
-
async getDraftsByCategory(userId?: string, category?: string, isAdminDraft?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Draft>>>> {
|
|
300
|
-
const localVarAxiosArgs = await DraftsApiAxiosParamCreator(configuration).getDraftsByCategory(userId, category, isAdminDraft, options);
|
|
301
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
302
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
303
|
-
return axios.request(axiosRequestArgs);
|
|
304
|
-
};
|
|
305
|
-
},
|
|
306
|
-
/**
|
|
307
|
-
*
|
|
308
|
-
* @summary Update a draft
|
|
309
|
-
* @param {string} id
|
|
310
|
-
* @param {*} [options] Override http request option.
|
|
311
|
-
* @throws {RequiredError}
|
|
312
|
-
*/
|
|
313
|
-
async updateDraft(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Draft>>> {
|
|
314
|
-
const localVarAxiosArgs = await DraftsApiAxiosParamCreator(configuration).updateDraft(id, options);
|
|
315
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
316
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
317
|
-
return axios.request(axiosRequestArgs);
|
|
318
|
-
};
|
|
319
|
-
},
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* DraftsApi - factory interface
|
|
325
|
-
* @export
|
|
326
|
-
*/
|
|
327
|
-
export const DraftsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
328
|
-
return {
|
|
329
|
-
/**
|
|
330
|
-
*
|
|
331
|
-
* @summary Create a new draft
|
|
332
|
-
* @param {CreateDraftDto} body
|
|
333
|
-
* @param {*} [options] Override http request option.
|
|
334
|
-
* @throws {RequiredError}
|
|
335
|
-
*/
|
|
336
|
-
async createDraft(body: CreateDraftDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Draft>> {
|
|
337
|
-
return DraftsApiFp(configuration).createDraft(body, options).then((request) => request(axios, basePath));
|
|
338
|
-
},
|
|
339
|
-
/**
|
|
340
|
-
*
|
|
341
|
-
* @summary Delete a draft
|
|
342
|
-
* @param {string} id
|
|
343
|
-
* @param {*} [options] Override http request option.
|
|
344
|
-
* @throws {RequiredError}
|
|
345
|
-
*/
|
|
346
|
-
async deleteDraft(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
347
|
-
return DraftsApiFp(configuration).deleteDraft(id, options).then((request) => request(axios, basePath));
|
|
348
|
-
},
|
|
349
|
-
/**
|
|
350
|
-
*
|
|
351
|
-
* @summary Get a draft by ID
|
|
352
|
-
* @param {string} id
|
|
353
|
-
* @param {*} [options] Override http request option.
|
|
354
|
-
* @throws {RequiredError}
|
|
355
|
-
*/
|
|
356
|
-
async getDraftById(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Draft>> {
|
|
357
|
-
return DraftsApiFp(configuration).getDraftById(id, options).then((request) => request(axios, basePath));
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
* Retrieve all drafts based on their categories. This function serves both regular customers and administrative dashboards. For admin-specific purposes, set isAdminDraft to true and specify the category without requiring a user ID. For regular customers, set isAdminDraft to false and include the category along with the user ID.
|
|
361
|
-
* @summary Get all drafts
|
|
362
|
-
* @param {string} [userId]
|
|
363
|
-
* @param {string} [category]
|
|
364
|
-
* @param {boolean} [isAdminDraft]
|
|
365
|
-
* @param {*} [options] Override http request option.
|
|
366
|
-
* @throws {RequiredError}
|
|
367
|
-
*/
|
|
368
|
-
async getDraftsByCategory(userId?: string, category?: string, isAdminDraft?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Draft>>> {
|
|
369
|
-
return DraftsApiFp(configuration).getDraftsByCategory(userId, category, isAdminDraft, options).then((request) => request(axios, basePath));
|
|
370
|
-
},
|
|
371
|
-
/**
|
|
372
|
-
*
|
|
373
|
-
* @summary Update a draft
|
|
374
|
-
* @param {string} id
|
|
375
|
-
* @param {*} [options] Override http request option.
|
|
376
|
-
* @throws {RequiredError}
|
|
377
|
-
*/
|
|
378
|
-
async updateDraft(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Draft>> {
|
|
379
|
-
return DraftsApiFp(configuration).updateDraft(id, options).then((request) => request(axios, basePath));
|
|
380
|
-
},
|
|
381
|
-
};
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* DraftsApi - object-oriented interface
|
|
386
|
-
* @export
|
|
387
|
-
* @class DraftsApi
|
|
388
|
-
* @extends {BaseAPI}
|
|
389
|
-
*/
|
|
390
|
-
export class DraftsApi extends BaseAPI {
|
|
391
|
-
/**
|
|
392
|
-
*
|
|
393
|
-
* @summary Create a new draft
|
|
394
|
-
* @param {CreateDraftDto} body
|
|
395
|
-
* @param {*} [options] Override http request option.
|
|
396
|
-
* @throws {RequiredError}
|
|
397
|
-
* @memberof DraftsApi
|
|
398
|
-
*/
|
|
399
|
-
public async createDraft(body: CreateDraftDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Draft>> {
|
|
400
|
-
return DraftsApiFp(this.configuration).createDraft(body, options).then((request) => request(this.axios, this.basePath));
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
*
|
|
404
|
-
* @summary Delete a draft
|
|
405
|
-
* @param {string} id
|
|
406
|
-
* @param {*} [options] Override http request option.
|
|
407
|
-
* @throws {RequiredError}
|
|
408
|
-
* @memberof DraftsApi
|
|
409
|
-
*/
|
|
410
|
-
public async deleteDraft(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
411
|
-
return DraftsApiFp(this.configuration).deleteDraft(id, options).then((request) => request(this.axios, this.basePath));
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
*
|
|
415
|
-
* @summary Get a draft by ID
|
|
416
|
-
* @param {string} id
|
|
417
|
-
* @param {*} [options] Override http request option.
|
|
418
|
-
* @throws {RequiredError}
|
|
419
|
-
* @memberof DraftsApi
|
|
420
|
-
*/
|
|
421
|
-
public async getDraftById(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Draft>> {
|
|
422
|
-
return DraftsApiFp(this.configuration).getDraftById(id, options).then((request) => request(this.axios, this.basePath));
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Retrieve all drafts based on their categories. This function serves both regular customers and administrative dashboards. For admin-specific purposes, set isAdminDraft to true and specify the category without requiring a user ID. For regular customers, set isAdminDraft to false and include the category along with the user ID.
|
|
426
|
-
* @summary Get all drafts
|
|
427
|
-
* @param {string} [userId]
|
|
428
|
-
* @param {string} [category]
|
|
429
|
-
* @param {boolean} [isAdminDraft]
|
|
430
|
-
* @param {*} [options] Override http request option.
|
|
431
|
-
* @throws {RequiredError}
|
|
432
|
-
* @memberof DraftsApi
|
|
433
|
-
*/
|
|
434
|
-
public async getDraftsByCategory(userId?: string, category?: string, isAdminDraft?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Draft>>> {
|
|
435
|
-
return DraftsApiFp(this.configuration).getDraftsByCategory(userId, category, isAdminDraft, options).then((request) => request(this.axios, this.basePath));
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
*
|
|
439
|
-
* @summary Update a draft
|
|
440
|
-
* @param {string} id
|
|
441
|
-
* @param {*} [options] Override http request option.
|
|
442
|
-
* @throws {RequiredError}
|
|
443
|
-
* @memberof DraftsApi
|
|
444
|
-
*/
|
|
445
|
-
public async updateDraft(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Draft>> {
|
|
446
|
-
return DraftsApiFp(this.configuration).updateDraft(id, options).then((request) => request(this.axios, this.basePath));
|
|
447
|
-
}
|
|
448
|
-
}
|