@blackcode_sa/metaestetics-api 1.8.4 → 1.8.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.8.4",
4
+ "version": "1.8.6",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -0,0 +1,26 @@
1
+ # Expo Safe Backoffice Module
2
+
3
+ This directory contains a curated collection of modules from the `backoffice` package that are guaranteed to be "Expo safe."
4
+
5
+ ## Purpose
6
+
7
+ The primary purpose of this module is to provide a subset of the `backoffice` functionality that is compatible with both Vite and Expo environments. Over time, the `backoffice` module has evolved to include dependencies and code that are not suitable for a React Native environment, leading to compatibility issues in our Expo applications.
8
+
9
+ To resolve this, we have isolated the components, services, types, and static data that are environment-agnostic and exported them through this "expo-safe" barrel file.
10
+
11
+ ## Usage
12
+
13
+ When you need to access `backoffice` features from within a shared context (e.g., in our mobile or clinic applications), you should import them from this module:
14
+
15
+ ```typescript
16
+ import {
17
+ BrandService,
18
+ PricingMeasure,
19
+ } from "@blackcode_sa/metaestetics-api/backoffice/expo-safe";
20
+ ```
21
+
22
+ By doing so, you can be confident that you are only using code that will run seamlessly across all our platforms.
23
+
24
+ ## Contribution
25
+
26
+ When adding new features to the `backoffice` package, please consider whether they are platform-agnostic. If they are, export them through this module to make them available to the wider range of applications. If a feature relies on web-specific APIs, it should be excluded from this module.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This barrel file exports modules from the 'backoffice' package that are considered safe
3
+ * for use in Expo and Vite applications. It carefully selects services, types, and static
4
+ * data that do not rely on environment-specific APIs, ensuring cross-platform compatibility.
5
+ */
6
+
7
+ // Backoffice services
8
+ export { BrandService } from "../services/brand.service";
9
+ export { CategoryService } from "../services/category.service";
10
+ export { SubcategoryService } from "../services/subcategory.service";
11
+ export { TechnologyService } from "../services/technology.service";
12
+ export { ProductService } from "../services/product.service";
13
+
14
+ // Backoffice types
15
+ export type { Brand } from "../types/brand.types";
16
+ export type { Category } from "../types/category.types";
17
+ export type { Product } from "../types/product.types";
18
+ export type { Requirement } from "../types/requirement.types";
19
+ export type { Subcategory } from "../types/subcategory.types";
20
+ export type {
21
+ Technology,
22
+ TechnologyDocumentationTemplate,
23
+ } from "../types/technology.types";
24
+
25
+ // Static pricing enums
26
+ export { PricingMeasure, Currency } from "../types/static/pricing.types";
27
+
28
+ // Other static types
29
+ export { BlockingCondition } from "../types/static/blocking-condition.types";
30
+ export {
31
+ CertificationSpecialty,
32
+ CertificationLevel,
33
+ } from "../types/static/certification.types";
34
+ export { Contraindication } from "../types/static/contraindication.types";
35
+ export { ProcedureFamily } from "../types/static/procedure-family.types";
36
+ export { TreatmentBenefit } from "../types/static/treatment-benefit.types";
37
+ export { RequirementType, TimeUnit } from "../types/requirement.types";
package/src/index.ts CHANGED
@@ -3,3 +3,4 @@ export * from "./types";
3
3
  export * from "./validations";
4
4
  export * from "./utils";
5
5
  export * from "./config/firebase";
6
+ export * from "./backoffice/expo-safe";