hey-pharmacist-ecommerce 1.1.29 → 1.1.30

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.
Files changed (48) hide show
  1. package/dist/index.d.mts +10734 -1256
  2. package/dist/index.d.ts +10734 -1256
  3. package/dist/index.js +2741 -295
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +2686 -296
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/src/hooks/useStoreCapabilities.ts +87 -0
  9. package/src/index.ts +4 -0
  10. package/src/lib/Apis/apis/auth-api.ts +19 -7
  11. package/src/lib/Apis/apis/categories-api.ts +97 -0
  12. package/src/lib/Apis/apis/products-api.ts +97 -0
  13. package/src/lib/Apis/apis/shipping-api.ts +105 -0
  14. package/src/lib/Apis/apis/stores-api.ts +356 -0
  15. package/src/lib/Apis/apis/sub-categories-api.ts +97 -0
  16. package/src/lib/Apis/apis/users-api.ts +8 -8
  17. package/src/lib/Apis/models/address-created-request.ts +0 -12
  18. package/src/lib/Apis/models/address.ts +0 -12
  19. package/src/lib/Apis/models/api-key-info-dto.ts +49 -0
  20. package/src/lib/Apis/models/create-address-dto.ts +0 -12
  21. package/src/lib/Apis/models/create-discount-dto.ts +0 -8
  22. package/src/lib/Apis/models/create-store-address-dto.ts +0 -12
  23. package/src/lib/Apis/models/create-store-dto-settings.ts +51 -0
  24. package/src/lib/Apis/models/create-store-dto.ts +7 -0
  25. package/src/lib/Apis/models/create-variant-dto.ts +0 -6
  26. package/src/lib/Apis/models/discount.ts +0 -8
  27. package/src/lib/Apis/models/index.ts +11 -0
  28. package/src/lib/Apis/models/populated-discount.ts +0 -8
  29. package/src/lib/Apis/models/product-variant.ts +0 -6
  30. package/src/lib/Apis/models/reorder-categories-dto.ts +27 -0
  31. package/src/lib/Apis/models/reorder-products-dto.ts +49 -0
  32. package/src/lib/Apis/models/reorder-products-success-response-dto.ts +33 -0
  33. package/src/lib/Apis/models/reorder-subcategories-dto.ts +33 -0
  34. package/src/lib/Apis/models/reorder-success-response-dto.ts +33 -0
  35. package/src/lib/Apis/models/shipment-with-order.ts +18 -0
  36. package/src/lib/Apis/models/shipment.ts +18 -0
  37. package/src/lib/Apis/models/store-api-keys-response-dto.ts +34 -0
  38. package/src/lib/Apis/models/store-capabilities-dto.ts +63 -0
  39. package/src/lib/Apis/models/store-entity.ts +7 -0
  40. package/src/lib/Apis/models/store.ts +7 -0
  41. package/src/lib/Apis/models/update-address-dto.ts +0 -12
  42. package/src/lib/Apis/models/update-api-keys-dto.ts +39 -0
  43. package/src/lib/Apis/models/update-discount-dto.ts +0 -8
  44. package/src/lib/Apis/models/update-manual-shipment-status-dto.ts +47 -0
  45. package/src/lib/Apis/models/update-store-dto.ts +7 -0
  46. package/src/lib/Apis/models/update-variant-dto.ts +0 -6
  47. package/src/screens/CheckoutScreen.tsx +363 -278
  48. package/src/screens/ResetPasswordScreen.tsx +10 -4
@@ -21,9 +21,12 @@ import { NewClientEmailDto } from '../models';
21
21
  import { RefillRequest } from '../models';
22
22
  import { RefillRequestDto } from '../models';
23
23
  import { ScheduleTourEmailDto } from '../models';
24
+ import { StoreApiKeysResponseDto } from '../models';
25
+ import { StoreCapabilitiesDto } from '../models';
24
26
  import { StoreEntity } from '../models';
25
27
  import { TransferePatientRequest } from '../models';
26
28
  import { TransferePatientsRequestDto } from '../models';
29
+ import { UpdateApiKeysDto } from '../models';
27
30
  import { UpdateRefillRequestDto } from '../models';
28
31
  import { UpdateStoreDto } from '../models';
29
32
  import { UpdateTransferePatientsRequestDto } from '../models';
@@ -270,6 +273,54 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
270
273
  options: localVarRequestOptions,
271
274
  };
272
275
  },
276
+ /**
277
+ *
278
+ * @summary Get store API keys with masked values
279
+ * @param {string} storeId
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ getApiKeys: async (storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
284
+ // verify required parameter 'storeId' is not null or undefined
285
+ if (storeId === null || storeId === undefined) {
286
+ throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling getApiKeys.');
287
+ }
288
+ const localVarPath = `/stores/{storeId}/api-keys`
289
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
290
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
291
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
292
+ let baseOptions;
293
+ if (configuration) {
294
+ baseOptions = configuration.baseOptions;
295
+ }
296
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
297
+ const localVarHeaderParameter = {} as any;
298
+ const localVarQueryParameter = {} as any;
299
+
300
+ // authentication x-store-key required
301
+ if (configuration && configuration.apiKey) {
302
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
303
+ ? await configuration.apiKey("x-store-key")
304
+ : await configuration.apiKey;
305
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
306
+ }
307
+
308
+ const query = new URLSearchParams(localVarUrlObj.search);
309
+ for (const key in localVarQueryParameter) {
310
+ query.set(key, localVarQueryParameter[key]);
311
+ }
312
+ for (const key in options.params) {
313
+ query.set(key, options.params[key]);
314
+ }
315
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
316
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
317
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
318
+
319
+ return {
320
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
321
+ options: localVarRequestOptions,
322
+ };
323
+ },
273
324
  /**
274
325
  *
275
326
  * @summary Get refill requests by store id
@@ -366,6 +417,54 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
366
417
  options: localVarRequestOptions,
367
418
  };
368
419
  },
420
+ /**
421
+ *
422
+ * @summary Get store capabilities (payment/delivery options available)
423
+ * @param {string} storeId
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ getStoreCapabilities: async (storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
428
+ // verify required parameter 'storeId' is not null or undefined
429
+ if (storeId === null || storeId === undefined) {
430
+ throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling getStoreCapabilities.');
431
+ }
432
+ const localVarPath = `/stores/{storeId}/capabilities`
433
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
434
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
435
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
436
+ let baseOptions;
437
+ if (configuration) {
438
+ baseOptions = configuration.baseOptions;
439
+ }
440
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
441
+ const localVarHeaderParameter = {} as any;
442
+ const localVarQueryParameter = {} as any;
443
+
444
+ // authentication x-store-key required
445
+ if (configuration && configuration.apiKey) {
446
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
447
+ ? await configuration.apiKey("x-store-key")
448
+ : await configuration.apiKey;
449
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
450
+ }
451
+
452
+ const query = new URLSearchParams(localVarUrlObj.search);
453
+ for (const key in localVarQueryParameter) {
454
+ query.set(key, localVarQueryParameter[key]);
455
+ }
456
+ for (const key in options.params) {
457
+ query.set(key, options.params[key]);
458
+ }
459
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
460
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
461
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
462
+
463
+ return {
464
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
465
+ options: localVarRequestOptions,
466
+ };
467
+ },
369
468
  /**
370
469
  *
371
470
  * @summary Get transfere patients requests by store id
@@ -414,6 +513,60 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
414
513
  options: localVarRequestOptions,
415
514
  };
416
515
  },
516
+ /**
517
+ *
518
+ * @summary Revoke/delete a specific API key
519
+ * @param {string} storeId
520
+ * @param {string} keyType Type of key to revoke
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ */
524
+ revokeApiKey: async (storeId: string, keyType: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
525
+ // verify required parameter 'storeId' is not null or undefined
526
+ if (storeId === null || storeId === undefined) {
527
+ throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling revokeApiKey.');
528
+ }
529
+ // verify required parameter 'keyType' is not null or undefined
530
+ if (keyType === null || keyType === undefined) {
531
+ throw new RequiredError('keyType','Required parameter keyType was null or undefined when calling revokeApiKey.');
532
+ }
533
+ const localVarPath = `/stores/{storeId}/api-keys/{keyType}`
534
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)))
535
+ .replace(`{${"keyType"}}`, encodeURIComponent(String(keyType)));
536
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
537
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
538
+ let baseOptions;
539
+ if (configuration) {
540
+ baseOptions = configuration.baseOptions;
541
+ }
542
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
543
+ const localVarHeaderParameter = {} as any;
544
+ const localVarQueryParameter = {} as any;
545
+
546
+ // authentication x-store-key required
547
+ if (configuration && configuration.apiKey) {
548
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
549
+ ? await configuration.apiKey("x-store-key")
550
+ : await configuration.apiKey;
551
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
552
+ }
553
+
554
+ const query = new URLSearchParams(localVarUrlObj.search);
555
+ for (const key in localVarQueryParameter) {
556
+ query.set(key, localVarQueryParameter[key]);
557
+ }
558
+ for (const key in options.params) {
559
+ query.set(key, options.params[key]);
560
+ }
561
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
562
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
563
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
564
+
565
+ return {
566
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
567
+ options: localVarRequestOptions,
568
+ };
569
+ },
417
570
  /**
418
571
  *
419
572
  * @param {*} [options] Override http request option.
@@ -903,6 +1056,63 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
903
1056
  options: localVarRequestOptions,
904
1057
  };
905
1058
  },
1059
+ /**
1060
+ *
1061
+ * @summary Update store API keys (Stripe/Shippo)
1062
+ * @param {UpdateApiKeysDto} body
1063
+ * @param {string} storeId
1064
+ * @param {*} [options] Override http request option.
1065
+ * @throws {RequiredError}
1066
+ */
1067
+ updateApiKeys: async (body: UpdateApiKeysDto, storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1068
+ // verify required parameter 'body' is not null or undefined
1069
+ if (body === null || body === undefined) {
1070
+ throw new RequiredError('body','Required parameter body was null or undefined when calling updateApiKeys.');
1071
+ }
1072
+ // verify required parameter 'storeId' is not null or undefined
1073
+ if (storeId === null || storeId === undefined) {
1074
+ throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling updateApiKeys.');
1075
+ }
1076
+ const localVarPath = `/stores/{storeId}/api-keys`
1077
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
1078
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1079
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
1080
+ let baseOptions;
1081
+ if (configuration) {
1082
+ baseOptions = configuration.baseOptions;
1083
+ }
1084
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
1085
+ const localVarHeaderParameter = {} as any;
1086
+ const localVarQueryParameter = {} as any;
1087
+
1088
+ // authentication x-store-key required
1089
+ if (configuration && configuration.apiKey) {
1090
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
1091
+ ? await configuration.apiKey("x-store-key")
1092
+ : await configuration.apiKey;
1093
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
1094
+ }
1095
+
1096
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1097
+
1098
+ const query = new URLSearchParams(localVarUrlObj.search);
1099
+ for (const key in localVarQueryParameter) {
1100
+ query.set(key, localVarQueryParameter[key]);
1101
+ }
1102
+ for (const key in options.params) {
1103
+ query.set(key, options.params[key]);
1104
+ }
1105
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
1106
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1107
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1108
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
1109
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
1110
+
1111
+ return {
1112
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
1113
+ options: localVarRequestOptions,
1114
+ };
1115
+ },
906
1116
  /**
907
1117
  *
908
1118
  * @summary Update refill request by id
@@ -1152,6 +1362,20 @@ export const StoresApiFp = function(configuration?: Configuration) {
1152
1362
  return axios.request(axiosRequestArgs);
1153
1363
  };
1154
1364
  },
1365
+ /**
1366
+ *
1367
+ * @summary Get store API keys with masked values
1368
+ * @param {string} storeId
1369
+ * @param {*} [options] Override http request option.
1370
+ * @throws {RequiredError}
1371
+ */
1372
+ async getApiKeys(storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<StoreApiKeysResponseDto>>> {
1373
+ const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).getApiKeys(storeId, options);
1374
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1375
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1376
+ return axios.request(axiosRequestArgs);
1377
+ };
1378
+ },
1155
1379
  /**
1156
1380
  *
1157
1381
  * @summary Get refill requests by store id
@@ -1180,6 +1404,20 @@ export const StoresApiFp = function(configuration?: Configuration) {
1180
1404
  return axios.request(axiosRequestArgs);
1181
1405
  };
1182
1406
  },
1407
+ /**
1408
+ *
1409
+ * @summary Get store capabilities (payment/delivery options available)
1410
+ * @param {string} storeId
1411
+ * @param {*} [options] Override http request option.
1412
+ * @throws {RequiredError}
1413
+ */
1414
+ async getStoreCapabilities(storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<StoreCapabilitiesDto>>> {
1415
+ const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).getStoreCapabilities(storeId, options);
1416
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1417
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1418
+ return axios.request(axiosRequestArgs);
1419
+ };
1420
+ },
1183
1421
  /**
1184
1422
  *
1185
1423
  * @summary Get transfere patients requests by store id
@@ -1194,6 +1432,21 @@ export const StoresApiFp = function(configuration?: Configuration) {
1194
1432
  return axios.request(axiosRequestArgs);
1195
1433
  };
1196
1434
  },
1435
+ /**
1436
+ *
1437
+ * @summary Revoke/delete a specific API key
1438
+ * @param {string} storeId
1439
+ * @param {string} keyType Type of key to revoke
1440
+ * @param {*} [options] Override http request option.
1441
+ * @throws {RequiredError}
1442
+ */
1443
+ async revokeApiKey(storeId: string, keyType: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
1444
+ const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).revokeApiKey(storeId, keyType, options);
1445
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1446
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1447
+ return axios.request(axiosRequestArgs);
1448
+ };
1449
+ },
1197
1450
  /**
1198
1451
  *
1199
1452
  * @param {*} [options] Override http request option.
@@ -1332,6 +1585,21 @@ export const StoresApiFp = function(configuration?: Configuration) {
1332
1585
  return axios.request(axiosRequestArgs);
1333
1586
  };
1334
1587
  },
1588
+ /**
1589
+ *
1590
+ * @summary Update store API keys (Stripe/Shippo)
1591
+ * @param {UpdateApiKeysDto} body
1592
+ * @param {string} storeId
1593
+ * @param {*} [options] Override http request option.
1594
+ * @throws {RequiredError}
1595
+ */
1596
+ async updateApiKeys(body: UpdateApiKeysDto, storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<StoreApiKeysResponseDto>>> {
1597
+ const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).updateApiKeys(body, storeId, options);
1598
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1599
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1600
+ return axios.request(axiosRequestArgs);
1601
+ };
1602
+ },
1335
1603
  /**
1336
1604
  *
1337
1605
  * @summary Update refill request by id
@@ -1435,6 +1703,16 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
1435
1703
  async getAllStores(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<StoreEntity>>> {
1436
1704
  return StoresApiFp(configuration).getAllStores(options).then((request) => request(axios, basePath));
1437
1705
  },
1706
+ /**
1707
+ *
1708
+ * @summary Get store API keys with masked values
1709
+ * @param {string} storeId
1710
+ * @param {*} [options] Override http request option.
1711
+ * @throws {RequiredError}
1712
+ */
1713
+ async getApiKeys(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<StoreApiKeysResponseDto>> {
1714
+ return StoresApiFp(configuration).getApiKeys(storeId, options).then((request) => request(axios, basePath));
1715
+ },
1438
1716
  /**
1439
1717
  *
1440
1718
  * @summary Get refill requests by store id
@@ -1455,6 +1733,16 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
1455
1733
  async getStoreById(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<StoreEntity>> {
1456
1734
  return StoresApiFp(configuration).getStoreById(storeId, options).then((request) => request(axios, basePath));
1457
1735
  },
1736
+ /**
1737
+ *
1738
+ * @summary Get store capabilities (payment/delivery options available)
1739
+ * @param {string} storeId
1740
+ * @param {*} [options] Override http request option.
1741
+ * @throws {RequiredError}
1742
+ */
1743
+ async getStoreCapabilities(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<StoreCapabilitiesDto>> {
1744
+ return StoresApiFp(configuration).getStoreCapabilities(storeId, options).then((request) => request(axios, basePath));
1745
+ },
1458
1746
  /**
1459
1747
  *
1460
1748
  * @summary Get transfere patients requests by store id
@@ -1465,6 +1753,17 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
1465
1753
  async getTransferePatientsRequests(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<TransferePatientRequest>>> {
1466
1754
  return StoresApiFp(configuration).getTransferePatientsRequests(storeId, options).then((request) => request(axios, basePath));
1467
1755
  },
1756
+ /**
1757
+ *
1758
+ * @summary Revoke/delete a specific API key
1759
+ * @param {string} storeId
1760
+ * @param {string} keyType Type of key to revoke
1761
+ * @param {*} [options] Override http request option.
1762
+ * @throws {RequiredError}
1763
+ */
1764
+ async revokeApiKey(storeId: string, keyType: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1765
+ return StoresApiFp(configuration).revokeApiKey(storeId, keyType, options).then((request) => request(axios, basePath));
1766
+ },
1468
1767
  /**
1469
1768
  *
1470
1769
  * @param {*} [options] Override http request option.
@@ -1559,6 +1858,17 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
1559
1858
  async sendScheduleTourEmail(body: ScheduleTourEmailDto, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1560
1859
  return StoresApiFp(configuration).sendScheduleTourEmail(body, options).then((request) => request(axios, basePath));
1561
1860
  },
1861
+ /**
1862
+ *
1863
+ * @summary Update store API keys (Stripe/Shippo)
1864
+ * @param {UpdateApiKeysDto} body
1865
+ * @param {string} storeId
1866
+ * @param {*} [options] Override http request option.
1867
+ * @throws {RequiredError}
1868
+ */
1869
+ async updateApiKeys(body: UpdateApiKeysDto, storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<StoreApiKeysResponseDto>> {
1870
+ return StoresApiFp(configuration).updateApiKeys(body, storeId, options).then((request) => request(axios, basePath));
1871
+ },
1562
1872
  /**
1563
1873
  *
1564
1874
  * @summary Update refill request by id
@@ -1656,6 +1966,17 @@ export class StoresApi extends BaseAPI {
1656
1966
  public async getAllStores(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<StoreEntity>>> {
1657
1967
  return StoresApiFp(this.configuration).getAllStores(options).then((request) => request(this.axios, this.basePath));
1658
1968
  }
1969
+ /**
1970
+ *
1971
+ * @summary Get store API keys with masked values
1972
+ * @param {string} storeId
1973
+ * @param {*} [options] Override http request option.
1974
+ * @throws {RequiredError}
1975
+ * @memberof StoresApi
1976
+ */
1977
+ public async getApiKeys(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreApiKeysResponseDto>> {
1978
+ return StoresApiFp(this.configuration).getApiKeys(storeId, options).then((request) => request(this.axios, this.basePath));
1979
+ }
1659
1980
  /**
1660
1981
  *
1661
1982
  * @summary Get refill requests by store id
@@ -1678,6 +1999,17 @@ export class StoresApi extends BaseAPI {
1678
1999
  public async getStoreById(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreEntity>> {
1679
2000
  return StoresApiFp(this.configuration).getStoreById(storeId, options).then((request) => request(this.axios, this.basePath));
1680
2001
  }
2002
+ /**
2003
+ *
2004
+ * @summary Get store capabilities (payment/delivery options available)
2005
+ * @param {string} storeId
2006
+ * @param {*} [options] Override http request option.
2007
+ * @throws {RequiredError}
2008
+ * @memberof StoresApi
2009
+ */
2010
+ public async getStoreCapabilities(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreCapabilitiesDto>> {
2011
+ return StoresApiFp(this.configuration).getStoreCapabilities(storeId, options).then((request) => request(this.axios, this.basePath));
2012
+ }
1681
2013
  /**
1682
2014
  *
1683
2015
  * @summary Get transfere patients requests by store id
@@ -1689,6 +2021,18 @@ export class StoresApi extends BaseAPI {
1689
2021
  public async getTransferePatientsRequests(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<TransferePatientRequest>>> {
1690
2022
  return StoresApiFp(this.configuration).getTransferePatientsRequests(storeId, options).then((request) => request(this.axios, this.basePath));
1691
2023
  }
2024
+ /**
2025
+ *
2026
+ * @summary Revoke/delete a specific API key
2027
+ * @param {string} storeId
2028
+ * @param {string} keyType Type of key to revoke
2029
+ * @param {*} [options] Override http request option.
2030
+ * @throws {RequiredError}
2031
+ * @memberof StoresApi
2032
+ */
2033
+ public async revokeApiKey(storeId: string, keyType: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
2034
+ return StoresApiFp(this.configuration).revokeApiKey(storeId, keyType, options).then((request) => request(this.axios, this.basePath));
2035
+ }
1692
2036
  /**
1693
2037
  *
1694
2038
  * @param {*} [options] Override http request option.
@@ -1794,6 +2138,18 @@ export class StoresApi extends BaseAPI {
1794
2138
  public async sendScheduleTourEmail(body: ScheduleTourEmailDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1795
2139
  return StoresApiFp(this.configuration).sendScheduleTourEmail(body, options).then((request) => request(this.axios, this.basePath));
1796
2140
  }
2141
+ /**
2142
+ *
2143
+ * @summary Update store API keys (Stripe/Shippo)
2144
+ * @param {UpdateApiKeysDto} body
2145
+ * @param {string} storeId
2146
+ * @param {*} [options] Override http request option.
2147
+ * @throws {RequiredError}
2148
+ * @memberof StoresApi
2149
+ */
2150
+ public async updateApiKeys(body: UpdateApiKeysDto, storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreApiKeysResponseDto>> {
2151
+ return StoresApiFp(this.configuration).updateApiKeys(body, storeId, options).then((request) => request(this.axios, this.basePath));
2152
+ }
1797
2153
  /**
1798
2154
  *
1799
2155
  * @summary Update refill request by id
@@ -20,6 +20,8 @@ import { BulkMoveSubcategoriesDto } from '../models';
20
20
  import { BulkUnassignSubcategoriesDto } from '../models';
21
21
  import { CreateSubCategoryDto } from '../models';
22
22
  import { MoveSubcategoryDto } from '../models';
23
+ import { ReorderSubcategoriesDto } from '../models';
24
+ import { ReorderSuccessResponseDto } from '../models';
23
25
  import { SubCategory } from '../models';
24
26
  import { UpdateSubCategoryDto } from '../models';
25
27
  /**
@@ -625,6 +627,66 @@ export const SubCategoriesApiAxiosParamCreator = function (configuration?: Confi
625
627
  options: localVarRequestOptions,
626
628
  };
627
629
  },
630
+ /**
631
+ *
632
+ * @summary Reorder subcategories within a parent category
633
+ * @param {ReorderSubcategoriesDto} body
634
+ * @param {*} [options] Override http request option.
635
+ * @throws {RequiredError}
636
+ */
637
+ reorderSubcategories: async (body: ReorderSubcategoriesDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
638
+ // verify required parameter 'body' is not null or undefined
639
+ if (body === null || body === undefined) {
640
+ throw new RequiredError('body','Required parameter body was null or undefined when calling reorderSubcategories.');
641
+ }
642
+ const localVarPath = `/sub-categories/reorder`;
643
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
644
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
645
+ let baseOptions;
646
+ if (configuration) {
647
+ baseOptions = configuration.baseOptions;
648
+ }
649
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
650
+ const localVarHeaderParameter = {} as any;
651
+ const localVarQueryParameter = {} as any;
652
+
653
+ // authentication bearer required
654
+ // http bearer authentication required
655
+ if (configuration && configuration.accessToken) {
656
+ const accessToken = typeof configuration.accessToken === 'function'
657
+ ? await configuration.accessToken()
658
+ : await configuration.accessToken;
659
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
660
+ }
661
+
662
+ // authentication x-store-key required
663
+ if (configuration && configuration.apiKey) {
664
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
665
+ ? await configuration.apiKey("x-store-key")
666
+ : await configuration.apiKey;
667
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
668
+ }
669
+
670
+ localVarHeaderParameter['Content-Type'] = 'application/json';
671
+
672
+ const query = new URLSearchParams(localVarUrlObj.search);
673
+ for (const key in localVarQueryParameter) {
674
+ query.set(key, localVarQueryParameter[key]);
675
+ }
676
+ for (const key in options.params) {
677
+ query.set(key, options.params[key]);
678
+ }
679
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
680
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
681
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
682
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
683
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
684
+
685
+ return {
686
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
687
+ options: localVarRequestOptions,
688
+ };
689
+ },
628
690
  /**
629
691
  *
630
692
  * @summary Unassign a subcategory from its parent category
@@ -899,6 +961,20 @@ export const SubCategoriesApiFp = function(configuration?: Configuration) {
899
961
  return axios.request(axiosRequestArgs);
900
962
  };
901
963
  },
964
+ /**
965
+ *
966
+ * @summary Reorder subcategories within a parent category
967
+ * @param {ReorderSubcategoriesDto} body
968
+ * @param {*} [options] Override http request option.
969
+ * @throws {RequiredError}
970
+ */
971
+ async reorderSubcategories(body: ReorderSubcategoriesDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReorderSuccessResponseDto>>> {
972
+ const localVarAxiosArgs = await SubCategoriesApiAxiosParamCreator(configuration).reorderSubcategories(body, options);
973
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
974
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
975
+ return axios.request(axiosRequestArgs);
976
+ };
977
+ },
902
978
  /**
903
979
  *
904
980
  * @summary Unassign a subcategory from its parent category
@@ -1039,6 +1115,16 @@ export const SubCategoriesApiFactory = function (configuration?: Configuration,
1039
1115
  async moveSubcategory(body: MoveSubcategoryDto, subcategoryId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SubCategory>> {
1040
1116
  return SubCategoriesApiFp(configuration).moveSubcategory(body, subcategoryId, options).then((request) => request(axios, basePath));
1041
1117
  },
1118
+ /**
1119
+ *
1120
+ * @summary Reorder subcategories within a parent category
1121
+ * @param {ReorderSubcategoriesDto} body
1122
+ * @param {*} [options] Override http request option.
1123
+ * @throws {RequiredError}
1124
+ */
1125
+ async reorderSubcategories(body: ReorderSubcategoriesDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReorderSuccessResponseDto>> {
1126
+ return SubCategoriesApiFp(configuration).reorderSubcategories(body, options).then((request) => request(axios, basePath));
1127
+ },
1042
1128
  /**
1043
1129
  *
1044
1130
  * @summary Unassign a subcategory from its parent category
@@ -1182,6 +1268,17 @@ export class SubCategoriesApi extends BaseAPI {
1182
1268
  public async moveSubcategory(body: MoveSubcategoryDto, subcategoryId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SubCategory>> {
1183
1269
  return SubCategoriesApiFp(this.configuration).moveSubcategory(body, subcategoryId, options).then((request) => request(this.axios, this.basePath));
1184
1270
  }
1271
+ /**
1272
+ *
1273
+ * @summary Reorder subcategories within a parent category
1274
+ * @param {ReorderSubcategoriesDto} body
1275
+ * @param {*} [options] Override http request option.
1276
+ * @throws {RequiredError}
1277
+ * @memberof SubCategoriesApi
1278
+ */
1279
+ public async reorderSubcategories(body: ReorderSubcategoriesDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReorderSuccessResponseDto>> {
1280
+ return SubCategoriesApiFp(this.configuration).reorderSubcategories(body, options).then((request) => request(this.axios, this.basePath));
1281
+ }
1185
1282
  /**
1186
1283
  *
1187
1284
  * @summary Unassign a subcategory from its parent category
@@ -217,7 +217,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
217
217
  },
218
218
  /**
219
219
  *
220
- * @summary Deletes a single user
220
+ * @summary Deletes my profile
221
221
  * @param {*} [options] Override http request option.
222
222
  * @throws {RequiredError}
223
223
  */
@@ -268,7 +268,7 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
268
268
  },
269
269
  /**
270
270
  *
271
- * @summary Deletes a single user
271
+ * @summary Deletes a single user by ID (Admin only)
272
272
  * @param {string} id
273
273
  * @param {*} [options] Override http request option.
274
274
  * @throws {RequiredError}
@@ -921,7 +921,7 @@ export const UsersApiFp = function(configuration?: Configuration) {
921
921
  },
922
922
  /**
923
923
  *
924
- * @summary Deletes a single user
924
+ * @summary Deletes my profile
925
925
  * @param {*} [options] Override http request option.
926
926
  * @throws {RequiredError}
927
927
  */
@@ -934,7 +934,7 @@ export const UsersApiFp = function(configuration?: Configuration) {
934
934
  },
935
935
  /**
936
936
  *
937
- * @summary Deletes a single user
937
+ * @summary Deletes a single user by ID (Admin only)
938
938
  * @param {string} id
939
939
  * @param {*} [options] Override http request option.
940
940
  * @throws {RequiredError}
@@ -1119,7 +1119,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
1119
1119
  },
1120
1120
  /**
1121
1121
  *
1122
- * @summary Deletes a single user
1122
+ * @summary Deletes my profile
1123
1123
  * @param {*} [options] Override http request option.
1124
1124
  * @throws {RequiredError}
1125
1125
  */
@@ -1128,7 +1128,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
1128
1128
  },
1129
1129
  /**
1130
1130
  *
1131
- * @summary Deletes a single user
1131
+ * @summary Deletes a single user by ID (Admin only)
1132
1132
  * @param {string} id
1133
1133
  * @param {*} [options] Override http request option.
1134
1134
  * @throws {RequiredError}
@@ -1277,7 +1277,7 @@ export class UsersApi extends BaseAPI {
1277
1277
  }
1278
1278
  /**
1279
1279
  *
1280
- * @summary Deletes a single user
1280
+ * @summary Deletes my profile
1281
1281
  * @param {*} [options] Override http request option.
1282
1282
  * @throws {RequiredError}
1283
1283
  * @memberof UsersApi
@@ -1287,7 +1287,7 @@ export class UsersApi extends BaseAPI {
1287
1287
  }
1288
1288
  /**
1289
1289
  *
1290
- * @summary Deletes a single user
1290
+ * @summary Deletes a single user by ID (Admin only)
1291
1291
  * @param {string} id
1292
1292
  * @param {*} [options] Override http request option.
1293
1293
  * @throws {RequiredError}