hey-pharmacist-ecommerce 1.1.42 → 1.1.44

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 (105) hide show
  1. package/README.md +70 -8
  2. package/dist/index.d.mts +2550 -3081
  3. package/dist/index.d.ts +2550 -3081
  4. package/dist/index.js +506 -399
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +506 -397
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/AccountOverviewTab.tsx +5 -5
  10. package/src/components/AccountReviewsTab.tsx +4 -4
  11. package/src/components/CartItem.tsx +15 -15
  12. package/src/components/Header.tsx +1 -1
  13. package/src/components/Notification.tsx +3 -3
  14. package/src/components/OrderCard.tsx +1 -1
  15. package/src/components/ProductCard.tsx +11 -11
  16. package/src/components/QuickViewModal.tsx +16 -16
  17. package/src/components/RatingDistribution.tsx +2 -2
  18. package/src/components/ReviewCard.tsx +2 -2
  19. package/src/components/ReviewForm.tsx +3 -3
  20. package/src/components/ReviewPromptBanner.tsx +4 -4
  21. package/src/components/ReviewsList.tsx +9 -11
  22. package/src/components/StarRating.tsx +3 -3
  23. package/src/hooks/useProducts.ts +0 -1
  24. package/src/hooks/useSmartSearch.ts +68 -0
  25. package/src/lib/Apis/api.ts +1 -1
  26. package/src/lib/Apis/apis/analytics-api.ts +809 -0
  27. package/src/lib/Apis/apis/notifications-api.ts +8 -6
  28. package/src/lib/Apis/apis/products-api.ts +390 -15
  29. package/src/lib/Apis/apis/stores-api.ts +26 -149
  30. package/src/lib/Apis/apis/web-hooks-api.ts +8 -17
  31. package/src/lib/Apis/models/analytics-period-dto.ts +45 -0
  32. package/src/lib/Apis/models/appointment-overview-dto.ts +71 -0
  33. package/src/lib/Apis/models/category-sales-dto.ts +51 -0
  34. package/src/lib/Apis/models/create-store-dto.ts +12 -0
  35. package/src/lib/Apis/models/customer-overview-dto.ts +96 -0
  36. package/src/lib/Apis/models/{country-stats-response-dto.ts → customer-segment-dto.ts} +12 -13
  37. package/src/lib/Apis/models/dashboard-overview-dto.ts +70 -0
  38. package/src/lib/Apis/models/discount-overview-dto.ts +71 -0
  39. package/src/lib/Apis/models/group-with-no-users-dto.ts +0 -6
  40. package/src/lib/Apis/models/group-with-users-dto.ts +0 -6
  41. package/src/lib/Apis/models/index.ts +29 -38
  42. package/src/lib/Apis/models/{single-recipient-dto.ts → inline-response200.ts} +11 -10
  43. package/src/lib/Apis/models/{create-contact-dto.ts → inline-response2001.ts} +11 -11
  44. package/src/lib/Apis/models/inventory-alert-dto.ts +67 -0
  45. package/src/lib/Apis/models/notification-dto.ts +107 -0
  46. package/src/lib/Apis/models/notifications-paginated-response-dto.ts +58 -0
  47. package/src/lib/Apis/models/order-overview-dto.ts +89 -0
  48. package/src/lib/Apis/models/{single-link-stats-dto.ts → order-status-count-dto.ts} +10 -10
  49. package/src/lib/Apis/models/order.ts +0 -6
  50. package/src/lib/Apis/models/payout-history-item-dto.ts +45 -0
  51. package/src/lib/Apis/models/{single-country-stats-dto.ts → popular-time-slot-dto.ts} +10 -10
  52. package/src/lib/Apis/models/populated-order.ts +0 -6
  53. package/src/lib/Apis/models/preference-update-item.ts +1 -0
  54. package/src/lib/Apis/models/product-overview-dto.ts +90 -0
  55. package/src/lib/Apis/models/product.ts +6 -0
  56. package/src/lib/Apis/models/{create-contact-list-dto.ts → products-aidraft-body.ts} +4 -4
  57. package/src/lib/Apis/models/{schedule-campaign-draft-dto.ts → products-processimage-body.ts} +5 -5
  58. package/src/lib/Apis/models/{contact-full-response-dto.ts → rating-distribution-dto.ts} +9 -10
  59. package/src/lib/Apis/models/recent-review-dto.ts +63 -0
  60. package/src/lib/Apis/models/review-overview-dto.ts +65 -0
  61. package/src/lib/Apis/models/store-balance-dto.ts +39 -0
  62. package/src/lib/Apis/models/store-entity.ts +12 -0
  63. package/src/lib/Apis/models/{link-stats-response-dto.ts → store-finance-overview-dto.ts} +10 -15
  64. package/src/lib/Apis/models/store.ts +12 -0
  65. package/src/lib/Apis/models/{add-contact-to-list-dto.ts → time-series-point-dto.ts} +9 -9
  66. package/src/lib/Apis/models/{create-email-template-dto.ts → top-customer-dto.ts} +20 -14
  67. package/src/lib/Apis/models/{marketing-list-contact-dto.ts → top-discount-dto.ts} +12 -12
  68. package/src/lib/Apis/models/{single-browser-stats-dto.ts → top-product-dto.ts} +18 -12
  69. package/src/lib/Apis/models/{marketing-campaign-content-dto.ts → unread-count-dto.ts} +6 -6
  70. package/src/lib/Apis/models/update-store-dto.ts +12 -0
  71. package/src/lib/Apis/models/update-user-dto.ts +0 -6
  72. package/src/lib/Apis/models/user-group.ts +0 -6
  73. package/src/lib/Apis/models/user-with-no-id.ts +0 -6
  74. package/src/lib/Apis/sharedConfig.ts +1 -1
  75. package/src/screens/CartScreen.tsx +10 -10
  76. package/src/screens/CheckoutScreen.tsx +12 -12
  77. package/src/screens/OrderReviewsScreen.tsx +6 -6
  78. package/src/screens/ProductDetailScreen.tsx +40 -40
  79. package/src/screens/SearchResultsScreen.tsx +17 -21
  80. package/src/screens/ShopScreen.tsx +20 -82
  81. package/src/lib/Apis/apis/marketing-api.ts +0 -3099
  82. package/src/lib/Apis/models/api-key-info-dto.ts +0 -49
  83. package/src/lib/Apis/models/browser-stats-response-dto.ts +0 -40
  84. package/src/lib/Apis/models/campaign-content-response-dto.ts +0 -40
  85. package/src/lib/Apis/models/campaign-draft-dto.ts +0 -175
  86. package/src/lib/Apis/models/campaign-draft-response-dto.ts +0 -40
  87. package/src/lib/Apis/models/campaign-draft-schedule-dto.ts +0 -49
  88. package/src/lib/Apis/models/campaign-draft-schedule-response-dto.ts +0 -40
  89. package/src/lib/Apis/models/campaign-draft-sending-dto.ts +0 -43
  90. package/src/lib/Apis/models/campaign-draft-sending-response-dto.ts +0 -40
  91. package/src/lib/Apis/models/contact-aggregated-stats-response-dto.ts +0 -40
  92. package/src/lib/Apis/models/contact-full-dto.ts +0 -93
  93. package/src/lib/Apis/models/contact-list-stats-response-dto.ts +0 -40
  94. package/src/lib/Apis/models/contact-lists-response-dto.ts +0 -40
  95. package/src/lib/Apis/models/create-marketing-campaign-dto.ts +0 -81
  96. package/src/lib/Apis/models/email-template-response-dto.ts +0 -117
  97. package/src/lib/Apis/models/general-stats-response-dto.ts +0 -40
  98. package/src/lib/Apis/models/send-test-email-dto.ts +0 -28
  99. package/src/lib/Apis/models/single-contact-aggregated-stats-dto.ts +0 -129
  100. package/src/lib/Apis/models/single-contact-list-stats-dto.ts +0 -117
  101. package/src/lib/Apis/models/single-general-stats.ts +0 -153
  102. package/src/lib/Apis/models/store-api-keys-response-dto.ts +0 -34
  103. package/src/lib/Apis/models/update-api-keys-dto.ts +0 -39
  104. package/src/lib/Apis/models/update-campaign-draft-content-dto.ts +0 -27
  105. package/src/lib/Apis/models/update-marketing-camp-draft-dto.ts +0 -81
@@ -23,12 +23,11 @@ import { RefillRequest } from '../models';
23
23
  import { RefillRequestDto } from '../models';
24
24
  import { ScheduleTourEmailDto } from '../models';
25
25
  import { ShippoAccountResponseDto } from '../models';
26
- import { StoreApiKeysResponseDto } from '../models';
27
26
  import { StoreCapabilitiesDto } from '../models';
28
27
  import { StoreEntity } from '../models';
28
+ import { StoreFinanceOverviewDto } from '../models';
29
29
  import { TransferePatientRequest } from '../models';
30
30
  import { TransferePatientsRequestDto } from '../models';
31
- import { UpdateApiKeysDto } from '../models';
32
31
  import { UpdateRefillRequestDto } from '../models';
33
32
  import { UpdateStoreDto } from '../models';
34
33
  import { UpdateTransferePatientsRequestDto } from '../models';
@@ -334,18 +333,12 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
334
333
  },
335
334
  /**
336
335
  *
337
- * @summary Get store API keys with masked values
338
- * @param {string} storeId
336
+ * @summary Get store finance overview
339
337
  * @param {*} [options] Override http request option.
340
338
  * @throws {RequiredError}
341
339
  */
342
- getApiKeys: async (storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
343
- // verify required parameter 'storeId' is not null or undefined
344
- if (storeId === null || storeId === undefined) {
345
- throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling getApiKeys.');
346
- }
347
- const localVarPath = `/stores/{storeId}/api-keys`
348
- .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
340
+ getFinanceOverview: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
341
+ const localVarPath = `/stores/finance/overview`;
349
342
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
350
343
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
351
344
  let baseOptions;
@@ -620,60 +613,6 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
620
613
  options: localVarRequestOptions,
621
614
  };
622
615
  },
623
- /**
624
- *
625
- * @summary Revoke/delete a specific API key
626
- * @param {string} storeId
627
- * @param {string} keyType Type of key to revoke
628
- * @param {*} [options] Override http request option.
629
- * @throws {RequiredError}
630
- */
631
- revokeApiKey: async (storeId: string, keyType: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
632
- // verify required parameter 'storeId' is not null or undefined
633
- if (storeId === null || storeId === undefined) {
634
- throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling revokeApiKey.');
635
- }
636
- // verify required parameter 'keyType' is not null or undefined
637
- if (keyType === null || keyType === undefined) {
638
- throw new RequiredError('keyType','Required parameter keyType was null or undefined when calling revokeApiKey.');
639
- }
640
- const localVarPath = `/stores/{storeId}/api-keys/{keyType}`
641
- .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)))
642
- .replace(`{${"keyType"}}`, encodeURIComponent(String(keyType)));
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: 'DELETE', ...baseOptions, ...options};
650
- const localVarHeaderParameter = {} as any;
651
- const localVarQueryParameter = {} as any;
652
-
653
- // authentication x-store-key required
654
- if (configuration && configuration.apiKey) {
655
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
656
- ? await configuration.apiKey("x-store-key")
657
- : await configuration.apiKey;
658
- localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
659
- }
660
-
661
- const query = new URLSearchParams(localVarUrlObj.search);
662
- for (const key in localVarQueryParameter) {
663
- query.set(key, localVarQueryParameter[key]);
664
- }
665
- for (const key in options.params) {
666
- query.set(key, options.params[key]);
667
- }
668
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
669
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
670
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
671
-
672
- return {
673
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
674
- options: localVarRequestOptions,
675
- };
676
- },
677
616
  /**
678
617
  *
679
618
  * @param {*} [options] Override http request option.
@@ -1165,30 +1104,19 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
1165
1104
  },
1166
1105
  /**
1167
1106
  *
1168
- * @summary Update store API keys (Stripe/Shippo)
1169
- * @param {UpdateApiKeysDto} body
1170
- * @param {string} storeId
1107
+ * @summary Generate Stripe Onboarding Link
1171
1108
  * @param {*} [options] Override http request option.
1172
1109
  * @throws {RequiredError}
1173
1110
  */
1174
- updateApiKeys: async (body: UpdateApiKeysDto, storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1175
- // verify required parameter 'body' is not null or undefined
1176
- if (body === null || body === undefined) {
1177
- throw new RequiredError('body','Required parameter body was null or undefined when calling updateApiKeys.');
1178
- }
1179
- // verify required parameter 'storeId' is not null or undefined
1180
- if (storeId === null || storeId === undefined) {
1181
- throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling updateApiKeys.');
1182
- }
1183
- const localVarPath = `/stores/{storeId}/api-keys`
1184
- .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
1111
+ startOnboarding: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
1112
+ const localVarPath = `/stores/onboarding`;
1185
1113
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1186
1114
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
1187
1115
  let baseOptions;
1188
1116
  if (configuration) {
1189
1117
  baseOptions = configuration.baseOptions;
1190
1118
  }
1191
- const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
1119
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
1192
1120
  const localVarHeaderParameter = {} as any;
1193
1121
  const localVarQueryParameter = {} as any;
1194
1122
 
@@ -1200,8 +1128,6 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
1200
1128
  localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
1201
1129
  }
1202
1130
 
1203
- localVarHeaderParameter['Content-Type'] = 'application/json';
1204
-
1205
1131
  const query = new URLSearchParams(localVarUrlObj.search);
1206
1132
  for (const key in localVarQueryParameter) {
1207
1133
  query.set(key, localVarQueryParameter[key]);
@@ -1212,8 +1138,6 @@ export const StoresApiAxiosParamCreator = function (configuration?: Configuratio
1212
1138
  localVarUrlObj.search = (new URLSearchParams(query)).toString();
1213
1139
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1214
1140
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1215
- const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
1216
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
1217
1141
 
1218
1142
  return {
1219
1143
  url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
@@ -1486,13 +1410,12 @@ export const StoresApiFp = function(configuration?: Configuration) {
1486
1410
  },
1487
1411
  /**
1488
1412
  *
1489
- * @summary Get store API keys with masked values
1490
- * @param {string} storeId
1413
+ * @summary Get store finance overview
1491
1414
  * @param {*} [options] Override http request option.
1492
1415
  * @throws {RequiredError}
1493
1416
  */
1494
- async getApiKeys(storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<StoreApiKeysResponseDto>>> {
1495
- const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).getApiKeys(storeId, options);
1417
+ async getFinanceOverview(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<StoreFinanceOverviewDto>>> {
1418
+ const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).getFinanceOverview(options);
1496
1419
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1497
1420
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1498
1421
  return axios.request(axiosRequestArgs);
@@ -1568,21 +1491,6 @@ export const StoresApiFp = function(configuration?: Configuration) {
1568
1491
  return axios.request(axiosRequestArgs);
1569
1492
  };
1570
1493
  },
1571
- /**
1572
- *
1573
- * @summary Revoke/delete a specific API key
1574
- * @param {string} storeId
1575
- * @param {string} keyType Type of key to revoke
1576
- * @param {*} [options] Override http request option.
1577
- * @throws {RequiredError}
1578
- */
1579
- async revokeApiKey(storeId: string, keyType: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
1580
- const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).revokeApiKey(storeId, keyType, options);
1581
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1582
- const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1583
- return axios.request(axiosRequestArgs);
1584
- };
1585
- },
1586
1494
  /**
1587
1495
  *
1588
1496
  * @param {*} [options] Override http request option.
@@ -1723,14 +1631,12 @@ export const StoresApiFp = function(configuration?: Configuration) {
1723
1631
  },
1724
1632
  /**
1725
1633
  *
1726
- * @summary Update store API keys (Stripe/Shippo)
1727
- * @param {UpdateApiKeysDto} body
1728
- * @param {string} storeId
1634
+ * @summary Generate Stripe Onboarding Link
1729
1635
  * @param {*} [options] Override http request option.
1730
1636
  * @throws {RequiredError}
1731
1637
  */
1732
- async updateApiKeys(body: UpdateApiKeysDto, storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<StoreApiKeysResponseDto>>> {
1733
- const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).updateApiKeys(body, storeId, options);
1638
+ async startOnboarding(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<any>>> {
1639
+ const localVarAxiosArgs = await StoresApiAxiosParamCreator(configuration).startOnboarding(options);
1734
1640
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1735
1641
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1736
1642
  return axios.request(axiosRequestArgs);
@@ -1852,13 +1758,12 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
1852
1758
  },
1853
1759
  /**
1854
1760
  *
1855
- * @summary Get store API keys with masked values
1856
- * @param {string} storeId
1761
+ * @summary Get store finance overview
1857
1762
  * @param {*} [options] Override http request option.
1858
1763
  * @throws {RequiredError}
1859
1764
  */
1860
- async getApiKeys(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<StoreApiKeysResponseDto>> {
1861
- return StoresApiFp(configuration).getApiKeys(storeId, options).then((request) => request(axios, basePath));
1765
+ async getFinanceOverview(options?: AxiosRequestConfig): Promise<AxiosResponse<StoreFinanceOverviewDto>> {
1766
+ return StoresApiFp(configuration).getFinanceOverview(options).then((request) => request(axios, basePath));
1862
1767
  },
1863
1768
  /**
1864
1769
  *
@@ -1910,17 +1815,6 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
1910
1815
  async getTransferePatientsRequests(storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<TransferePatientRequest>>> {
1911
1816
  return StoresApiFp(configuration).getTransferePatientsRequests(storeId, options).then((request) => request(axios, basePath));
1912
1817
  },
1913
- /**
1914
- *
1915
- * @summary Revoke/delete a specific API key
1916
- * @param {string} storeId
1917
- * @param {string} keyType Type of key to revoke
1918
- * @param {*} [options] Override http request option.
1919
- * @throws {RequiredError}
1920
- */
1921
- async revokeApiKey(storeId: string, keyType: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1922
- return StoresApiFp(configuration).revokeApiKey(storeId, keyType, options).then((request) => request(axios, basePath));
1923
- },
1924
1818
  /**
1925
1819
  *
1926
1820
  * @param {*} [options] Override http request option.
@@ -2017,14 +1911,12 @@ export const StoresApiFactory = function (configuration?: Configuration, basePat
2017
1911
  },
2018
1912
  /**
2019
1913
  *
2020
- * @summary Update store API keys (Stripe/Shippo)
2021
- * @param {UpdateApiKeysDto} body
2022
- * @param {string} storeId
1914
+ * @summary Generate Stripe Onboarding Link
2023
1915
  * @param {*} [options] Override http request option.
2024
1916
  * @throws {RequiredError}
2025
1917
  */
2026
- async updateApiKeys(body: UpdateApiKeysDto, storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<StoreApiKeysResponseDto>> {
2027
- return StoresApiFp(configuration).updateApiKeys(body, storeId, options).then((request) => request(axios, basePath));
1918
+ async startOnboarding(options?: AxiosRequestConfig): Promise<AxiosResponse<any>> {
1919
+ return StoresApiFp(configuration).startOnboarding(options).then((request) => request(axios, basePath));
2028
1920
  },
2029
1921
  /**
2030
1922
  *
@@ -2137,14 +2029,13 @@ export class StoresApi extends BaseAPI {
2137
2029
  }
2138
2030
  /**
2139
2031
  *
2140
- * @summary Get store API keys with masked values
2141
- * @param {string} storeId
2032
+ * @summary Get store finance overview
2142
2033
  * @param {*} [options] Override http request option.
2143
2034
  * @throws {RequiredError}
2144
2035
  * @memberof StoresApi
2145
2036
  */
2146
- public async getApiKeys(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreApiKeysResponseDto>> {
2147
- return StoresApiFp(this.configuration).getApiKeys(storeId, options).then((request) => request(this.axios, this.basePath));
2037
+ public async getFinanceOverview(options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreFinanceOverviewDto>> {
2038
+ return StoresApiFp(this.configuration).getFinanceOverview(options).then((request) => request(this.axios, this.basePath));
2148
2039
  }
2149
2040
  /**
2150
2041
  *
@@ -2201,18 +2092,6 @@ export class StoresApi extends BaseAPI {
2201
2092
  public async getTransferePatientsRequests(storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<TransferePatientRequest>>> {
2202
2093
  return StoresApiFp(this.configuration).getTransferePatientsRequests(storeId, options).then((request) => request(this.axios, this.basePath));
2203
2094
  }
2204
- /**
2205
- *
2206
- * @summary Revoke/delete a specific API key
2207
- * @param {string} storeId
2208
- * @param {string} keyType Type of key to revoke
2209
- * @param {*} [options] Override http request option.
2210
- * @throws {RequiredError}
2211
- * @memberof StoresApi
2212
- */
2213
- public async revokeApiKey(storeId: string, keyType: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
2214
- return StoresApiFp(this.configuration).revokeApiKey(storeId, keyType, options).then((request) => request(this.axios, this.basePath));
2215
- }
2216
2095
  /**
2217
2096
  *
2218
2097
  * @param {*} [options] Override http request option.
@@ -2320,15 +2199,13 @@ export class StoresApi extends BaseAPI {
2320
2199
  }
2321
2200
  /**
2322
2201
  *
2323
- * @summary Update store API keys (Stripe/Shippo)
2324
- * @param {UpdateApiKeysDto} body
2325
- * @param {string} storeId
2202
+ * @summary Generate Stripe Onboarding Link
2326
2203
  * @param {*} [options] Override http request option.
2327
2204
  * @throws {RequiredError}
2328
2205
  * @memberof StoresApi
2329
2206
  */
2330
- public async updateApiKeys(body: UpdateApiKeysDto, storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<StoreApiKeysResponseDto>> {
2331
- return StoresApiFp(this.configuration).updateApiKeys(body, storeId, options).then((request) => request(this.axios, this.basePath));
2207
+ public async startOnboarding(options?: AxiosRequestConfig) : Promise<AxiosResponse<any>> {
2208
+ return StoresApiFp(this.configuration).startOnboarding(options).then((request) => request(this.axios, this.basePath));
2332
2209
  }
2333
2210
  /**
2334
2211
  *
@@ -25,21 +25,15 @@ export const WebHooksApiAxiosParamCreator = function (configuration?: Configurat
25
25
  /**
26
26
  *
27
27
  * @param {string} stripeSignature
28
- * @param {string} storeId
29
28
  * @param {*} [options] Override http request option.
30
29
  * @throws {RequiredError}
31
30
  */
32
- handleIncomingEvents: async (stripeSignature: string, storeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
31
+ handleIncomingEvents: async (stripeSignature: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
33
32
  // verify required parameter 'stripeSignature' is not null or undefined
34
33
  if (stripeSignature === null || stripeSignature === undefined) {
35
34
  throw new RequiredError('stripeSignature','Required parameter stripeSignature was null or undefined when calling handleIncomingEvents.');
36
35
  }
37
- // verify required parameter 'storeId' is not null or undefined
38
- if (storeId === null || storeId === undefined) {
39
- throw new RequiredError('storeId','Required parameter storeId was null or undefined when calling handleIncomingEvents.');
40
- }
41
- const localVarPath = `/webhook/stripe/{storeId}`
42
- .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
36
+ const localVarPath = `/webhook/stripe`;
43
37
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
38
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
45
39
  let baseOptions;
@@ -115,12 +109,11 @@ export const WebHooksApiFp = function(configuration?: Configuration) {
115
109
  /**
116
110
  *
117
111
  * @param {string} stripeSignature
118
- * @param {string} storeId
119
112
  * @param {*} [options] Override http request option.
120
113
  * @throws {RequiredError}
121
114
  */
122
- async handleIncomingEvents(stripeSignature: string, storeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
123
- const localVarAxiosArgs = await WebHooksApiAxiosParamCreator(configuration).handleIncomingEvents(stripeSignature, storeId, options);
115
+ async handleIncomingEvents(stripeSignature: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
116
+ const localVarAxiosArgs = await WebHooksApiAxiosParamCreator(configuration).handleIncomingEvents(stripeSignature, options);
124
117
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
125
118
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
126
119
  return axios.request(axiosRequestArgs);
@@ -150,12 +143,11 @@ export const WebHooksApiFactory = function (configuration?: Configuration, baseP
150
143
  /**
151
144
  *
152
145
  * @param {string} stripeSignature
153
- * @param {string} storeId
154
146
  * @param {*} [options] Override http request option.
155
147
  * @throws {RequiredError}
156
148
  */
157
- async handleIncomingEvents(stripeSignature: string, storeId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
158
- return WebHooksApiFp(configuration).handleIncomingEvents(stripeSignature, storeId, options).then((request) => request(axios, basePath));
149
+ async handleIncomingEvents(stripeSignature: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
150
+ return WebHooksApiFp(configuration).handleIncomingEvents(stripeSignature, options).then((request) => request(axios, basePath));
159
151
  },
160
152
  /**
161
153
  *
@@ -178,13 +170,12 @@ export class WebHooksApi extends BaseAPI {
178
170
  /**
179
171
  *
180
172
  * @param {string} stripeSignature
181
- * @param {string} storeId
182
173
  * @param {*} [options] Override http request option.
183
174
  * @throws {RequiredError}
184
175
  * @memberof WebHooksApi
185
176
  */
186
- public async handleIncomingEvents(stripeSignature: string, storeId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
187
- return WebHooksApiFp(this.configuration).handleIncomingEvents(stripeSignature, storeId, options).then((request) => request(this.axios, this.basePath));
177
+ public async handleIncomingEvents(stripeSignature: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
178
+ return WebHooksApiFp(this.configuration).handleIncomingEvents(stripeSignature, options).then((request) => request(this.axios, this.basePath));
188
179
  }
189
180
  /**
190
181
  *
@@ -0,0 +1,45 @@
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
+ /**
15
+ *
16
+ * @export
17
+ * @interface AnalyticsPeriodDto
18
+ */
19
+ export interface AnalyticsPeriodDto {
20
+ _id?: string;
21
+ /**
22
+ *
23
+ * @type {Date}
24
+ * @memberof AnalyticsPeriodDto
25
+ */
26
+ start: Date;
27
+ /**
28
+ *
29
+ * @type {Date}
30
+ * @memberof AnalyticsPeriodDto
31
+ */
32
+ end: Date;
33
+ /**
34
+ *
35
+ * @type {Date}
36
+ * @memberof AnalyticsPeriodDto
37
+ */
38
+ previousStart: Date;
39
+ /**
40
+ *
41
+ * @type {Date}
42
+ * @memberof AnalyticsPeriodDto
43
+ */
44
+ previousEnd: Date;
45
+ }
@@ -0,0 +1,71 @@
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 { PopularTimeSlotDto } from './popular-time-slot-dto';
15
+ import { TimeSeriesPointDto } from './time-series-point-dto';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AppointmentOverviewDto
20
+ */
21
+ export interface AppointmentOverviewDto {
22
+ _id?: string;
23
+ /**
24
+ * Total appointments in period
25
+ * @type {number}
26
+ * @memberof AppointmentOverviewDto
27
+ */
28
+ totalAppointments: number;
29
+ /**
30
+ * Booked/confirmed appointments
31
+ * @type {number}
32
+ * @memberof AppointmentOverviewDto
33
+ */
34
+ bookedAppointments: number;
35
+ /**
36
+ * Cancelled appointments
37
+ * @type {number}
38
+ * @memberof AppointmentOverviewDto
39
+ */
40
+ cancelledAppointments: number;
41
+ /**
42
+ * Cancellation rate (%)
43
+ * @type {number}
44
+ * @memberof AppointmentOverviewDto
45
+ */
46
+ cancellationRate: number;
47
+ /**
48
+ * Utilization rate - % of available slots booked
49
+ * @type {number}
50
+ * @memberof AppointmentOverviewDto
51
+ */
52
+ utilizationRate: number;
53
+ /**
54
+ * Appointment growth vs previous period (%)
55
+ * @type {number}
56
+ * @memberof AppointmentOverviewDto
57
+ */
58
+ appointmentGrowth: number;
59
+ /**
60
+ * Most popular booking times
61
+ * @type {Array<PopularTimeSlotDto>}
62
+ * @memberof AppointmentOverviewDto
63
+ */
64
+ popularTimeSlots: Array<PopularTimeSlotDto>;
65
+ /**
66
+ * Daily appointment trend
67
+ * @type {Array<TimeSeriesPointDto>}
68
+ * @memberof AppointmentOverviewDto
69
+ */
70
+ dailyTrend: Array<TimeSeriesPointDto>;
71
+ }
@@ -0,0 +1,51 @@
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
+ /**
15
+ *
16
+ * @export
17
+ * @interface CategorySalesDto
18
+ */
19
+ export interface CategorySalesDto {
20
+ _id?: string;
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof CategorySalesDto
25
+ */
26
+ categoryId: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof CategorySalesDto
31
+ */
32
+ categoryName: string;
33
+ /**
34
+ *
35
+ * @type {number}
36
+ * @memberof CategorySalesDto
37
+ */
38
+ productCount: number;
39
+ /**
40
+ *
41
+ * @type {number}
42
+ * @memberof CategorySalesDto
43
+ */
44
+ totalSales: number;
45
+ /**
46
+ *
47
+ * @type {number}
48
+ * @memberof CategorySalesDto
49
+ */
50
+ percentage: number;
51
+ }
@@ -67,6 +67,18 @@ export interface CreateStoreDto {
67
67
  * @memberof CreateStoreDto
68
68
  */
69
69
  stripeWebhookSecret?: string;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof CreateStoreDto
74
+ */
75
+ stripeAccountId?: string;
76
+ /**
77
+ *
78
+ * @type {boolean}
79
+ * @memberof CreateStoreDto
80
+ */
81
+ stripeOnboardingCompleted?: boolean;
70
82
  /**
71
83
  *
72
84
  * @type {string}
@@ -0,0 +1,96 @@
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 { CustomerSegmentDto } from './customer-segment-dto';
15
+ import { TimeSeriesPointDto } from './time-series-point-dto';
16
+ import { TopCustomerDto } from './top-customer-dto';
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface CustomerOverviewDto
21
+ */
22
+ export interface CustomerOverviewDto {
23
+ _id?: string;
24
+ /**
25
+ * Total registered customers
26
+ * @type {number}
27
+ * @memberof CustomerOverviewDto
28
+ */
29
+ totalCustomers: number;
30
+ /**
31
+ * New customers in period
32
+ * @type {number}
33
+ * @memberof CustomerOverviewDto
34
+ */
35
+ newCustomers: number;
36
+ /**
37
+ * Customers who placed repeat orders
38
+ * @type {number}
39
+ * @memberof CustomerOverviewDto
40
+ */
41
+ returningCustomers: number;
42
+ /**
43
+ * B2B customers count
44
+ * @type {number}
45
+ * @memberof CustomerOverviewDto
46
+ */
47
+ b2bCustomers: number;
48
+ /**
49
+ * Regular customers count
50
+ * @type {number}
51
+ * @memberof CustomerOverviewDto
52
+ */
53
+ regularCustomers: number;
54
+ /**
55
+ * Average customer lifetime value
56
+ * @type {number}
57
+ * @memberof CustomerOverviewDto
58
+ */
59
+ averageLTV: number;
60
+ /**
61
+ * Average orders per customer
62
+ * @type {number}
63
+ * @memberof CustomerOverviewDto
64
+ */
65
+ avgOrdersPerCustomer: number;
66
+ /**
67
+ * Repeat purchase rate (%)
68
+ * @type {number}
69
+ * @memberof CustomerOverviewDto
70
+ */
71
+ repeatPurchaseRate: number;
72
+ /**
73
+ * Customer growth vs previous period (%)
74
+ * @type {number}
75
+ * @memberof CustomerOverviewDto
76
+ */
77
+ customerGrowth: number;
78
+ /**
79
+ * Customer activity segmentation
80
+ * @type {CustomerSegmentDto}
81
+ * @memberof CustomerOverviewDto
82
+ */
83
+ segments: CustomerSegmentDto;
84
+ /**
85
+ * Top spending customers
86
+ * @type {Array<TopCustomerDto>}
87
+ * @memberof CustomerOverviewDto
88
+ */
89
+ topCustomers: Array<TopCustomerDto>;
90
+ /**
91
+ * Daily new customer signups
92
+ * @type {Array<TimeSeriesPointDto>}
93
+ * @memberof CustomerOverviewDto
94
+ */
95
+ dailySignups: Array<TimeSeriesPointDto>;
96
+ }